- 工信部备案号 滇ICP备05000110号-1
- 滇公安备案 滇53010302000111
- 增值电信业务经营许可证 B1.B2-20181647、滇B1.B2-20190004
- 云南互联网协会理事单位
- 安全联盟认证网站身份V标记
- 域名注册服务机构许可:滇D3-20230001
- 代理域名注册服务机构:新网数码
问题:浏览器打开https://www.landui.com/aaa.html,然后跳转到http://www.landui.com/aaa.html
网站架构:用户--https--->nginx代理---http---->tomcat/nginx+php
nginx待遇发给后端的请求是http协议,后端程序跳转获取到的协议是http,返回一个redirect(http header中带Location:http://www.landui.com/aaa.html),浏览器收到location,跳转到了location指定的地方。
解决方法
解决方法1:
在nginx代理中增加一个header,标志用户请求是http还是https,后端获取header决定跳转到http/https页面。这个方法需要修改nginx配置和程序,不推荐,但是可以解决问题。
解决方法2
nginx代理中配置proxy_redirect
proxy_redirect http:// $scheme://;
以上指令会将后端响应header location内容中的http://替换成用户端协议https://。
NGINX访问https跳转到http的解决了~
售前咨询
售后咨询
备案咨询
二维码
TOP