码迷,mamicode.com
首页 > 其他好文 > 详细

Nginx 反向代理的正确配置

时间:2015-10-12 10:35:51      阅读:158      评论:0      收藏:0      [点我收藏+]

标签:

server { 
listen 80; 
server_name 127.0.0.1;

#charset koi8-r;

#access_log logs/host.access.log main;

location /{ 
proxy_pass http://paila; 
proxy_redirect off ; 
proxy_set_header Host $host; 
proxy_set_header X-Real-IP $remote_addr; 
proxy_set_header REMOTE-HOST $remote_addr; 
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
client_max_body_size 50m; 
client_body_buffer_size 256k; 
proxy_connect_timeout 1; 
proxy_send_timeout 30; 
proxy_read_timeout 60; 
proxy_buffer_size 256k; 
proxy_buffers 4 256k; 
proxy_busy_buffers_size 256k; 
proxy_temp_file_write_size 256k; 
proxy_next_upstream error timeout invalid_header http_500 http_503 http_404; 
proxy_max_temp_file_size 128m; 
}

 

Nginx 反向代理的正确配置

标签:

原文地址:http://www.cnblogs.com/flyfish2012/p/4870845.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!