너 바보 아니야

Nginx 反向代理

2019-09-19

安装nginx

高防服务器上 nginx.conf 配置模板

1
2
3
4
5
6
7
8
9
10
server_name  www.xxx.com;
...
location / {
proxy_redirect off;
proxy_pass http://ip[原服务器ip];
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
index index.html index.htm;
}
使用支付宝打赏
使用微信打赏

欢迎点击上方按钮对我打赏,谢谢你给我吃糖果