
解决nginx反向代理验证码不显示的方法
先看代码
1
2
3
4
5
6
7
8
9
10
11
12
location / {
proxy_pass_header Server;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:9090;
proxy_read_timeout 120;
proxy_send_timeout 120;
}
上面的代码会导致验证码无法正确显示
正确的代码应该是下面的
1
2
3
4
5
6
7
8
9
10
11
12
location ~ / {
proxy_pass_header Server;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:9090;
proxy_read_timeout 120;
proxy_send_timeout 120;
}
💘 相关文章
- 免费的Nginx 代理,管理器面板
- nginx反向代理配置演示,包括静态资源处理,百分百成功
- Nginx使用Memcached缓存加速wordpress,秒开网站
- nginx配置时HTTPS出现"nginx: [warn] "ssl_stapling" ignored"的解决方法
- 宝塔面板乱码的解决方法
- 注册nginx的systemctl服务
- nginx: [warn] "ssl_stapling" ignored, not supported告警
- nginx: [emerg] unknown directive "set_real_ip_from"的解决方法
- 比较简单实用高效的网站防止灌水和反爬虫方案
- nginx: [warn] "ssl_stapling" ignored, issuer certificate not found for certificate的错误解决方法