stanley-king 4 years ago
parent
commit
59696a0445

+ 1 - 1
conf/nginx/nginx-debug-http.conf

@@ -66,7 +66,7 @@ http
          add_header Cache-Control no-store;
             set  $folder_name /var/www/html/public;
             root           $folder_name;
-            fastcgi_pass   devfpm:9000;
+            fastcgi_pass   lfpm:9000;
             fastcgi_index  index.php;
             fastcgi_split_path_info ^(.+\.php)(.*)$;
             fastcgi_param PATH_INFO $fastcgi_path_info;

+ 0 - 96
conf/nginx/nginx-debug-https.conf

@@ -1,96 +0,0 @@
-
-user nginx;
-worker_processes  1;
-error_log   /var/error.log  info;
-#pid        logs/nginx.pid;
-worker_rlimit_nofile 1024;
-
-events {
-    worker_connections  1024;
-}
-
-http 
-{
-    include       mime.types;
-    default_type  application/octet-stream;
-    fastcgi_buffer_size 32k;
-    fastcgi_buffers 8 32k;
-    underscores_in_headers on;
-    client_max_body_size 1024M;
-
-    sendfile            on;
-    keepalive_timeout   65;
-
-    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
-                      '$status $body_bytes_sent "$http_referer" '
-                      '"$http_user_agent" "$http_x_forwarded_for"';
-    server
-    {
-        listen       443 ssl;
-        set  $folder_name /var/www/html;
-        server_name www.xyzshops.cn;
-        root $folder_name;
-
-        ssl_certificate      cert/www.xyzshops.cn.pem;
-        ssl_certificate_key  cert/www.xyzshops.cn.key;
-
-        ssl_session_cache    shared:SSL:1m;
-        ssl_session_timeout  5m;
-
-        ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;  #使用此加密套件。
-        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;   #使用该协议进行配置。
-        ssl_prefer_server_ciphers on;
-
-        index index.html index.php;
-    	client_max_body_size 100m;
-    	proxy_connect_timeout 500s;
-        proxy_read_timeout 500s;
-        proxy_send_timeout 500s;
-        fastcgi_connect_timeout 75;
-        fastcgi_read_timeout 600;
-        fastcgi_send_timeout 600;
-
-        charset utf-8;
-
-        location /logs {
-            deny all;
-            return 403;
-        }
-
-        location /data/log {
-            deny all;
-            return 403;
-        }
-        location / {
-            index  index.html index.htm index.php;
-        }
-
-        location /mshop {
-            root $folder_name;
-            autoindex on;
-            index  index.html index.htm index.php;
-	        try_files $uri $uri/ /mshop/index.html;
-        }
-
-        location ~ /mobile/[/\w]+\.php$ {
-            root           $folder_name;
-            fastcgi_pass   mobilesrv:9100;
-            fastcgi_index  index.php;
-            fastcgi_param  SCRIPT_FILENAME  $folder_name$fastcgi_script_name;
-            include fastcgi_params;
-        }
-
-        location ~ /mobile/[/\w]+\.html$ {
-            try_files $uri $uri/ /mobile/index.html;
-        }
-
-        location ~ \.php$ {
-	        add_header Cache-Control no-store;
-            root           $folder_name;
-            fastcgi_pass   fpmsrv:9000;
-            fastcgi_index  index.php;
-            fastcgi_param  SCRIPT_FILENAME  $folder_name$fastcgi_script_name;
-            include        fastcgi_params;
-        }
-    }
-}

+ 1 - 1
conf/php-fpm/php.ini

@@ -1324,7 +1324,7 @@ bcmath.scale = 0
 ; Handler used to store/retrieve data.
 ; http://php.net/session.save-handler
 session.save_handler = redis
-session.save_path = "tcp://devredis:6380"
+session.save_path = "tcp://lredis:6379"
 
 ;session.save_handler = files
 

+ 1 - 1
conf/php/php.ini

@@ -1325,7 +1325,7 @@ bcmath.scale = 0
 ; http://php.net/session.save-handler
 ;session.save_handler = file
 session.save_handler = redis
-session.save_path = tcp://devredis:6380
+session.save_path = tcp://lredis:6379
 
 ; Argument passed to save_handler.  In the case of files, this is the path
 ; where data files are stored. Note: Windows users have to change this

+ 1 - 1
config/cache.php

@@ -17,7 +17,7 @@ return [
     // 驱动方式
     'type'   => 'redis',
     // 缓存保存目录
-    'path'   => 'tcp://devredis:6380',
+    'path'   => 'tcp://lredis:6379',
     // 缓存前缀
     'prefix' => '',
     // 缓存有效期 0表示永久缓存

+ 12 - 12
docker-compose-mac.yml

@@ -1,7 +1,7 @@
 version: "3.7"
 
 services:
-  devnginx:
+  lnginx:
     image: nginx:alpine
     ports:
       - "8080:8080"
@@ -10,20 +10,20 @@ services:
       - $PWD/conf/nginx/nginx-debug-http.conf:/etc/nginx/nginx.conf:ro
       - $PWD:/var/www/html
     links:
-      - devfpm
-    container_name: "dev-nginx"
+      - lfpm
+    container_name: "logic-nginx"
     command: [nginx,'-g','daemon off;']
 
-  devredis:
+  lredis:
     image: redis:alpine
     ports:
       - "6380:6379"
     volumes:
       - $PWD/conf/etc/localtime:/etc/localtime:ro
-    container_name: "dev-redis"
+    container_name: "logic-redis"
     command: [ "redis-server"]
 
-  devfpm:
+  lfpm:
     image: php-fpm:alpine
     volumes:
       - $PWD/conf/etc/localtime:/etc/localtime:ro
@@ -31,19 +31,19 @@ services:
       - $PWD/conf/php-fpm/php-debug.ini:/usr/local/etc/php/php.ini
       - $PWD/conf/php-fpm/php-fpm.conf:/usr/local/etc/php-fpm.conf
       - $PWD/conf/php-fpm/docker-php-fpm-start:/usr/local/bin/docker-php-fpm-start
-    container_name: "dev-web"
+    container_name: "logic-web"
     command: [docker-php-fpm-start]
     depends_on:
-      - devredis
+      - lredis
 
-  devphp:
+  lphp:
     image: php-zts-debug:7.3.18
     volumes:
       - $PWD/conf/etc/localtime:/etc/localtime:ro
       - $PWD/conf/php/php-debug.ini:/usr/local/etc/php/php.ini
       - $PWD:/var/www/html
     links:
-      - devredis
-    container_name: "dev-php"
+      - lredis
+    container_name: "logic-php"
     depends_on:
-      - "devredis"
+      - "lredis"

+ 12 - 12
docker-compose-test.yml

@@ -1,7 +1,7 @@
 version: "3.7"
 
 services:
-  testnginx:
+  lnginx:
     image: nginx:alpine
     ports:
       - "8080:8080"
@@ -10,20 +10,20 @@ services:
       - $PWD/conf/nginx/nginx-debug-http.conf:/etc/nginx/nginx.conf:ro
       - $PWD:/var/www/html
     links:
-      - devfpm
-    container_name: "test-nginx"
+      - lfpm
+    container_name: "logic-nginx"
     command: [nginx,'-g','daemon off;']
 
-  devredis:
+  lredis:
     image: redis:alpine
     ports:
       - "6380:6379"
     volumes:
       - $PWD/conf/etc/localtime:/etc/localtime:ro
-    container_name: "dev-redis"
+    container_name: "logic-redis"
     command: [ "redis-server"]
 
-  devfpm:
+  lfpm:
     image: php-fpm:alpine
     volumes:
       - $PWD/conf/etc/localtime:/etc/localtime:ro
@@ -31,19 +31,19 @@ services:
       - $PWD/conf/php-fpm/php-debug.ini:/usr/local/etc/php/php.ini
       - $PWD/conf/php-fpm/php-fpm.conf:/usr/local/etc/php-fpm.conf
       - $PWD/conf/php-fpm/docker-php-fpm-start:/usr/local/bin/docker-php-fpm-start
-    container_name: "dev-web"
+    container_name: "logic-web"
     command: [docker-php-fpm-start]
     depends_on:
-      - devredis
+      - lredis
 
-  devphp:
+  lphp:
     image: php-zts-debug:7.3.18
     volumes:
       - $PWD/conf/etc/localtime:/etc/localtime:ro
       - $PWD/conf/php/php-debug.ini:/usr/local/etc/php/php.ini
       - $PWD:/var/www/html
     links:
-      - devredis
-    container_name: "dev-php"
+      - lredis
+    container_name: "logic-php"
     depends_on:
-      - "devredis"
+      - "lredis"

+ 1 - 1
thinkphp/library/think/cache/driver/Redis.php

@@ -23,7 +23,7 @@ use think\cache\Driver;
 class Redis extends Driver
 {
     protected $options = [
-        'host'       => 'devredis',
+        'host'       => 'tcp://lredis',
         'port'       => 6379,
         'password'   => '',
         'select'     => 0,

+ 1 - 1
thinkphp/library/think/session/driver/Redis.php

@@ -19,7 +19,7 @@ class Redis implements SessionHandlerInterface
     /** @var \Redis */
     protected $handler = null;
     protected $config  = [
-        'host'         => 'devredis', // redis主机
+        'host'         => 'lredis', // redis主机
         'port'         => 6379, // redis端口
         'password'     => '', // 密码
         'select'       => 0, // 操作库