server{
listen 80;
server_name jira.baidu.com; # 公网ip
index index.php index.html index.htm;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_redirect off;
proxy_set_header Host $host:$server_port; ##重点在$server_port
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_max_temp_file_size 0;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_hide_header Vary;
proxy_set_header Accept-Encoding ”;
proxy_set_header Referer $http_referer;
proxy_set_header Cookie $http_cookie;
}
}
暂无讨论,说说你的看法吧