請問有人會nginx的嗎??想請問粗體字的設置是為何要設定這些呢?
proxy_temp_path /tmp/nginx_proxy_temp;
proxy_cache_path /tmp/nginx_proxy_cache levels=1:2 keys_zone=oecache:100m inactive=3d max_size=1000m;
proxy_buffer_size 32k; #设置代理服务器(nginx)保存用户头信息的缓冲区大小
proxy_buffers 4 32k; #proxy_buffers缓冲区,网页平均在32k以下的话,这样设置
proxy_busy_buffers_size 64k; #高负荷下缓冲大小(proxy_buffers*2)
proxy_temp_file_write_size 64k; #设定缓存文件夹大小,大于这个值,将从upstream服务器传
proxy_connect_timeout 60;
proxy_send_timeout 60;
proxy_read_timeout 3000;
upstream oeserver{
server 127.0.0.1:8069;
}
server {
server_name www.example.com;
root /var/www/openerp-6.1-1/openerp/addons;
location /{
proxy_cache oecache;
#proxy_cache_key "$host$request_uri$request_body";
proxy_cache_key $host$request_uri$request_body;
proxy_cache_valid 200 304 1d;
proxy_cache_valid any 1d;
proxy_next_upstream http_502 http_504 error timeout invalid_header;
proxy_pass_header Set-Cookie;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
proxy_pass http://oeserver;
proxy_buffering on;
proxy_cache_valid 1d;
expires 1d;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
proxy_buffering on;
proxy_cache_valid 1d;
expires 1d;
}
}
proxy_temp_path /tmp/nginx_proxy_temp;
proxy_cache_path /tmp/nginx_proxy_cache levels=1:2 keys_zone=oecache:100m inactive=3d max_size=1000m;
proxy_buffer_size 32k; #设置代理服务器(nginx)保存用户头信息的缓冲区大小
proxy_buffers 4 32k; #proxy_buffers缓冲区,网页平均在32k以下的话,这样设置
proxy_busy_buffers_size 64k; #高负荷下缓冲大小(proxy_buffers*2)
proxy_temp_file_write_size 64k; #设定缓存文件夹大小,大于这个值,将从upstream服务器传
proxy_connect_timeout 60;
proxy_send_timeout 60;
proxy_read_timeout 3000;
upstream oeserver{
server 127.0.0.1:8069;
}
server {
server_name www.example.com;
root /var/www/openerp-6.1-1/openerp/addons;
location /{
proxy_cache oecache;
#proxy_cache_key "$host$request_uri$request_body";
proxy_cache_key $host$request_uri$request_body;
proxy_cache_valid 200 304 1d;
proxy_cache_valid any 1d;
proxy_next_upstream http_502 http_504 error timeout invalid_header;
proxy_pass_header Set-Cookie;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
proxy_pass http://oeserver;
proxy_buffering on;
proxy_cache_valid 1d;
expires 1d;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
proxy_buffering on;
proxy_cache_valid 1d;
expires 1d;
}
}