Procházet zdrojové kódy

add sub domain name

stanley-king před 4 roky
rodič
revize
10d9ce0ba9
3 změnil soubory, kde provedl 39 přidání a 28 odebrání
  1. 35 26
      conf/nginx/nginx-test-http.conf
  2. 3 1
      docker-compose-mac.yml
  3. 1 1
      docker-compose-test.yml

+ 35 - 26
conf/nginx/nginx-test-http.conf

@@ -27,21 +27,21 @@ http
 
     server 
     {
-    	listen       80;
-        set  $folder_name /var/www/html;
-        server_name www.xyzshops.cn;
+    	listen       8080;
+        set  $folder_name /var/www/html/public;
+        server_name zngapi.hemadj.com;
         root $folder_name;
-        index index.html index.php; 
+        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;   
+        fastcgi_read_timeout 600;
+        fastcgi_send_timeout 600;
 
         charset utf-8;
-        
+
         location /logs {
             deny all;
             return 403;
@@ -54,33 +54,42 @@ 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;
+         if (!-e $request_filename) {
+            rewrite  ^(.*)$  /index.php?s=/$1  last;
         }
 
-        location ~ /mobile/[/\w]+\.php$ {
+        location ~ \.php {
+         add_header Cache-Control no-store;
+            set  $folder_name /var/www/html/public;
             root           $folder_name;
-            fastcgi_pass   tmobilesrv:9100;
+            fastcgi_pass   lfpm: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;
+            include        fastcgi_params;
         }
+    }
 
-        location ~ /mobile/[/\w]+\.html$ {
-            try_files $uri $uri/ /mobile/index.html;
-        }
+    server
+    {
+        listen       8080;
+        set  $folder_name /var/www/html/admin;
+        server_name zngadm.hemadj.com;
+        root $folder_name;
+        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;
 
-        location ~ \.php$ {
-	        add_header Cache-Control no-store;
-            root           $folder_name;
-            fastcgi_pass   tfpmsrv:9000;
-            fastcgi_index  index.php;
-            fastcgi_param  SCRIPT_FILENAME  $folder_name$fastcgi_script_name;
-            include        fastcgi_params;
+        charset utf-8;
+
+        location / {
+            index  index.html index.htm index.php;
         }
     }
 }

+ 3 - 1
docker-compose-mac.yml

@@ -23,7 +23,7 @@ services:
       - $PWD/conf/etc/localtime:/etc/localtime:ro
       - $PWD/conf/redis/6379.conf:/etc/redis/redis.conf
     container_name: "logic-redis"
-    command: [ redis-server,"/etc/redis/redis.conf"]
+    command: [redis-server,"/etc/redis/redis.conf"]
 
   lfpm:
     image: php-fpm:alpine
@@ -35,6 +35,8 @@ services:
       - $PWD/conf/php-fpm/docker-php-fpm-start:/usr/local/bin/docker-php-fpm-start
     container_name: "logic-web"
     command: [docker-php-fpm-start]
+    links:
+      - lredis
     depends_on:
       - lredis
 

+ 1 - 1
docker-compose-test.yml

@@ -7,7 +7,7 @@ services:
       - "8080:8080"
     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:
       - lfpm