瀏覽代碼

add 28 config

stanley-king 4 年之前
父節點
當前提交
e01a2cf0e3
共有 3 個文件被更改,包括 108 次插入1 次删除
  1. 1 1
      docker-compose.yml
  2. 14 0
      docker/compose/lz-28/docker-compose.yml
  3. 93 0
      docker/conf/nginx/nginx-28-http.conf

+ 1 - 1
docker-compose.yml

@@ -9,7 +9,7 @@ services:
       - $PWD:/var/www/html
       - $PWD/conf/etc/localtime:/etc/localtime:ro
       - /mnt/upload:/var/www/html/data/upload
-      - /mnt/wapshop:/var/www/html/mshop
+#      - /mnt/wapshop:/var/www/html/mshop
       - /mnt/merchant:/var/www/html/merchant
       - $PWD/conf/nginx/cert:/etc/nginx/cert
       - $PWD/conf/nginx/nginx-prod-https.conf:/etc/nginx/nginx.conf:ro

+ 14 - 0
docker/compose/lz-28/docker-compose.yml

@@ -1,6 +1,20 @@
 version: "3.7"
 
 services:
+    nginxsrv:
+      image: nginx:alpine
+      ports:
+#        - "443:443"
+        - "80:80"
+      volumes:
+        - ../../../:/var/www/html
+        - ../../conf/etc/localtime:/etc/localtime:ro
+        - /mnt/upload:/var/www/html/data/upload
+        - /mnt/merchant:/var/www/html/merchant
+      - ../../conf/nginx/nginx-28-http.conf:/etc/nginx/nginx.conf:ro
+      container_name: "panda-nginx"
+      command: [nginx,'-g','daemon off;']
+
   redisrv:
     image: redis:alpine
     ports:

+ 93 - 0
docker/conf/nginx/nginx-28-http.conf

@@ -0,0 +1,93 @@
+
+user nginx;
+worker_processes  1;
+error_log   /var/error.log  info;
+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       80;
+        set  $folder_name /var/www/html;
+        server_name 121.89.212.167;
+        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;   
+
+        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   172.16.110.28: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 ~ /racc/[/\w]+\.php$ {
+            root           $folder_name;
+            fastcgi_pass   172.16.110.28:9101;
+            fastcgi_index  index.php;
+            fastcgi_param  SCRIPT_FILENAME  $folder_name$fastcgi_script_name;
+            include fastcgi_params;
+        }
+
+        location ~ \.php$ {
+	        add_header Cache-Control no-store;
+            root           $folder_name;
+            fastcgi_pass   172.16.110.28:9000;
+            fastcgi_index  index.php;
+            fastcgi_param  SCRIPT_FILENAME  $folder_name$fastcgi_script_name;
+            include        fastcgi_params;
+        }
+    }
+}