stanley-king 4 years ago
parent
commit
4ee18ca45b
2 changed files with 10 additions and 28 deletions
  1. 9 27
      conf/nginx/nginx-test-http.conf
  2. 1 1
      docker-compose-test.yml

+ 9 - 27
conf/nginx/nginx-test-http.conf

@@ -29,7 +29,7 @@ http
     {
     	listen       80;
         set  $folder_name /var/www/html;
-        server_name www.xyzshops.cn;
+        server_name 39.97.239.116;
         root $folder_name;
         index index.html index.php; 
     	client_max_body_size 100m;
@@ -41,12 +41,6 @@ http
         fastcgi_send_timeout 600;   
 
         charset utf-8;
-        
-        location /logs {
-            deny all;
-            return 403;
-        }
-
         location /data/log {
             deny all;
             return 403;
@@ -54,31 +48,19 @@ http
         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   tmobilesrv: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;
+        if (!-e $request_filename) {
+            rewrite  ^(.*)$  /index.php?s=/$1  last;
         }
 
-        location ~ \.php$ {
-	        add_header Cache-Control no-store;
+        location ~ \.php {
+            add_header Cache-Control no-store;
+            set  $folder_name /var/www/html/public;
             root           $folder_name;
-            fastcgi_pass   tfpmsrv:9000;
+            fastcgi_pass   accfpm:9000;
             fastcgi_index  index.php;
+            fastcgi_split_path_info ^(.+\.php)(.*)$;
+            fastcgi_param PATH_INFO $fastcgi_path_info;
             fastcgi_param  SCRIPT_FILENAME  $folder_name$fastcgi_script_name;
             include        fastcgi_params;
         }

+ 1 - 1
docker-compose-test.yml

@@ -7,7 +7,7 @@ services:
       - "8088:8088"
     volumes:
       - $PWD/conf/etc/localtime:/etc/localtime:ro
-      - $PWD/conf/nginx/nginx-debug-http.conf:/etc/nginx/nginx.conf:ro
+      - $PWD/conf/nginx/nginx-test-http.conf:/etc/nginx/nginx.conf:ro
       - $PWD:/var/www/html
     links:
       - accfpm