server {
listen 80;
server_name 域名;
include /etc/nginx/default.d/*.conf;
location / {
proxy_pass http://127.0.0.1:18089; #内网端口
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /500.html {
}
}
标签:set,header,html,代理,nginx,阿里,proxy,location From: https://www.cnblogs.com/Amos-Turing/p/17623730.html