Ssl nginx-不安全的http服务器错误地重定向到https服务器
我有一个在docker上运行的小网站,端口9090上运行“dev”版本,端口8080上运行“master”版本 我在没有在docker上运行的主机上使用Nginx来处理来自internet的请求在端口80/443上的代理 端口80/443代理工作正常。没问题 问题:当尝试创建一个在端口90上运行的服务器来显示打算不安全的站点的开发版本时,这似乎是试图重定向回站点的SSL版本,这是由浏览器重定向到SSL确认的,我在页面上得到一个错误:ERR_SSL_PROTOCOL_error 如果我注释掉在端口80上运行的服务器,这个问题就会消失,但是我会丢失live/master站点上的端口80重定向 有人能看到我如何设置配置的问题吗?谢谢!配置如下:Ssl nginx-不安全的http服务器错误地重定向到https服务器,ssl,nginx,docker,Ssl,Nginx,Docker,我有一个在docker上运行的小网站,端口9090上运行“dev”版本,端口8080上运行“master”版本 我在没有在docker上运行的主机上使用Nginx来处理来自internet的请求在端口80/443上的代理 端口80/443代理工作正常。没问题 问题:当尝试创建一个在端口90上运行的服务器来显示打算不安全的站点的开发版本时,这似乎是试图重定向回站点的SSL版本,这是由浏览器重定向到SSL确认的,我在页面上得到一个错误:ERR_SSL_PROTOCOL_error 如果我注释掉在端口
server {
listen 443 ssl;
server_name xxxxxxxxxxxxx.co.uk www.xxxxxxxxxxxxx.co.uk;
{some ssl config here}
add_header Strict-Transport-Security max-age=15768000;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
auth_basic "Restricted Content";
auth_basic_user_file /etc/nginx/.htpasswd;
proxy_pass http://localhost:8080;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
server {
listen 80;
server_name xxxxxxxxxxxxx.co.uk www.xxxxxxxxxxxxx.co.uk;
return 301 https://$host$request_uri;
}
server {
listen 90;
server_name xxxxxxxxxxxxx.co.uk www.xxxxxxxxxxxxx.co.uk;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
auth_basic "Restricted Content";
auth_basic_user_file /etc/nginx/.htpasswd;
proxy_pass http://localhost:9090;
proxy_redirect off;
}
}
您的问题可能是由端口433上设置的严格传输安全标头引起的。它告诉浏览器在头中的时间强制此服务器/域上使用SSL 尝试删除标头并尝试使用无缓存浏览器