nginx配置模板2

[root@localhost conf]# cd conf.d/
[root@localhost conf.d]# ll
总用量 12
-rwxr-xr-x. 1 richmail richmail 5245 2月   3 23:25 mail.conf
-rwxr-xr-x. 1 richmail richmail 1484 2月   4 09:11 note.conf
[root@localhost conf.d]# less note.conf 
        proxy_cache_valid 0;    
        proxy_set_header Host $host:$server_port;
        
        proxy_set_header        X-Real-IP $remote_addr;
        proxy_set_header        X-Forwarded-For $remote_addr;
        proxy_set_header        X-Forwarded-Proto  $scheme;
        client_max_body_size    100m;
        proxy_connect_timeout   1m;
        proxy_send_timeout      1m; 
        proxy_read_timeout      1m; 
        proxy_temp_file_write_size 640k;
        proxy_buffer_size         320k;
        proxy_buffers             4 320k;
        proxy_buffering         off;
        proxy_store             off;
        proxy_busy_buffers_size 640k;
        proxy_ignore_client_abort on; 
        proxy_next_upstream error timeout invalid_header http_503 http_502;
        proxy_hide_header ETag;

        location / {
                index  index.html index.htm index.php index.jsp;
                root /home/richmail/nginx/html;
        }

        location /webnote {
                index  index.html index.htm index.php index.jsp;
                proxy_pass http://127.0.0.1:8011;
        }
        location ~ healthcheck.htm$ {
                index  index.html index.htm index.php index.jsp;
                root /home/richmail/nginx/html;
        }
     
        location /noteres {
                index index.htm index.html public.html;
                root /home/richmail/web/html;
                proxy_cache tmp_cache;
                proxy_cache_valid 20m;
                expires 2h;
        }
[root@localhost conf.d]# 

猜你喜欢

转载自wuzhaohuixy-qq-com.iteye.com/blog/2191004