Ver Fonte

fix:修改nginx配置

ly há 9 meses atrás
pai
commit
595817f6dc
1 ficheiros alterados com 4 adições e 2 exclusões
  1. 4 2
      nginx.conf

+ 4 - 2
nginx.conf

@@ -12,10 +12,13 @@ http {
     sendfile        on;
     keepalive_timeout  65;
     client_max_body_size 20m;
+    proxy_cache_path /home/nginx/html/cache levels=1:2 keys_zone=mycache:500m inactive=1d max_size=10g;
+    proxy_temp_path /home/nginx/html/cache/proxy_temp;
 
     server { 
 	listen 80; 
 	server_name   124.70.62.143;
+	proxy_cache mycache;
     # ssl_certificate  /home/nginx/html/yzbh/ssl/www.dljpwx.com.crt;
     # ssl_certificate_key  /home/nginx/html/yzbh/ssl/www.dljpwx.com.key;
     # ssl_session_cache    shared:SSL:1m;
@@ -39,7 +42,7 @@ http {
         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
         proxy_pass http://172.18.0.1:8040/;
         proxy_read_timeout 10m;
-        proxy_temp_file_write_size 25m;
+        proxy_cache off;
     }
     location /ezhizao-yzbh-sys/{
         proxy_set_header Host $http_host;
@@ -48,7 +51,6 @@ http {
         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
         proxy_pass http://172.18.0.1:8040/;
         proxy_read_timeout 10m;
-        proxy_temp_file_write_size 25m;
     }
     location /ezhizao-yzbh-crm/{
         proxy_set_header Host $http_host;