200字范文,内容丰富有趣,生活中的好帮手!
200字范文 > nginx配置https后 重定向总是跳转到http

nginx配置https后 重定向总是跳转到http

时间:2021-01-08 08:10:32

相关推荐

nginx配置https后 重定向总是跳转到http

在nginx.conf里配置一下 加入以下配置

server_name_in_redirect off;proxy_redirect http:// https://;proxy_set_header Host $host:$server_port;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

完整的

location / {root html;index index.html index.htm;proxy_pass http://192.168.250.5:81;server_name_in_redirect off;proxy_redirect http:// https://;proxy_set_header Host $host:$server_port;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;client_max_body_size 10M;}

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。