#user www www;worker_processes 1;error_log logs/error.log;pid logs/nginx.pid;worker_rlimit_nofile 65535;events {# use epoll;worker_connections 65535;}http {include mime.types;default_type application/octet-stream;#include /opal/apps/nginx-1.6.3/conf/reverse-proxy.conf;sendfile on;keepalive_timeout 65;gzip on;client_max_body_size 50m;#缓冲区代理缓冲用户端请求的最大字节数,可以理解为保存到本地再传给用户client_body_buffer_size 256k;client_header_timeout 3m;client_body_timeout 3m;send_timeout 3m;proxy_connect_timeout 300s;#nginx 跟后端服务器连接超时时间(代理连接超时)proxy_read_timeout 300s;#连接成功后,后端服务器响应时间(代理接收超时)proxy_send_timeout 300s;proxy_buffer_size 256k;#设置代理服务器(nginx)保存用户头信息的缓冲区大小proxy_buffers 4 128k;#proxy_buffers 缓冲区,网页平均在 32k以下的话,这样设置proxy_busy_buffers_size 256k;#高负荷下缓冲大小(proxy_buffers*2)proxy_temp_file_write_size 256k;#设定缓存文件夹大小,大于这个值,将从 upstream服务器传递请求,而不缓冲到磁盘proxy_ignore_client_abort on;#不允许代理端主动关闭连接 weight为权值数字越大,表明请求到的机会越大。upstream local_tomcat {server x.x.x.x:8080 weight=5;server x.x.x.x:8090 weight=1;}server {listen 80;server_name x.x.x.x default;location / {proxy_buffer_size 64k;proxy_buffers 32 32k;proxy_busy_buffers_size 128k;proxy_redirect off;proxy_set_header Host $host:80;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;proxy_pass http://local_tomcat;}#目录重定向location /ssp/material/ {alias D:/ssp/material/;}# error_page 500 502 503 504 /50x.html;# location = /50x.html {# root html;# }}}
目录重定向
最新推荐文章于 2024-03-21 16:15:24 发布