Nginx Chrome远程调试端口无法通过ssh运行>;https
含铬(在电子应用程序中) 我需要在公共IP上使用。出于安全原因,Chrome不允许从除“localhost”之外的其他主机名进行访问 为了解决这个问题,我使用ssh tunnel和以下命令:Nginx Chrome远程调试端口无法通过ssh运行>;https,nginx,ssh,https,google-chrome-devtools,Nginx,Ssh,Https,Google Chrome Devtools,含铬(在电子应用程序中) 我需要在公共IP上使用。出于安全原因,Chrome不允许从除“localhost”之外的其他主机名进行访问 为了解决这个问题,我使用ssh tunnel和以下命令: ssh -L 0.0.0.0:4101:localhost:4100 localhost -N 它工作正常,我可以通过http://:4101/访问它。但现在我想通过https使用它 为此,我尝试使用Nginx,因为我已经将其用于HTTPS: server { listen 4101
ssh -L 0.0.0.0:4101:localhost:4100 localhost -N
它工作正常,我可以通过http://:4101/访问它。但现在我想通过https使用它
为此,我尝试使用Nginx,因为我已经将其用于HTTPS:
server {
listen 4101 ssl;
proxy_connect_timeout 7d;
proxy_send_timeout 7d;
proxy_read_timeout 7d;
ssl_certificate /etc/nginx/ssl/server.crt;
ssl_certificate_key /etc/nginx/ssl/server.key;
charset utf-8;
add_header Strict-Transport-Security "max-age=31536000";
location / {
proxy_pass http://127.0.0.1:4100/;
}
}
但我得到了这个错误:
2018/08/28 16:28:22[错误]4234#4234:*3上游提前关闭
从上游读取响应头时的连接,客户端:
10.0.19.235,服务器:,请求:“GET/favicon.ico HTTP/1.1”,上游:,主机:“myDomain.local:4101”,
推荐人:“
我尝试使用不同的值更改此标题,如$server\u addr、$remote\u addr、“localhost”、127.0.0.1,但没有结果:
proxy_set_header Host $host;
proxy_set_header X-Real-IP $server_addr;
proxy_set_header X-Forwarded-for $server_addr;
我认为有必要更改一些标题,让远程控制台认为我们来自本地主机,但即使在阅读了Nginx文档之后,我也不知道是哪一个
你有什么建议吗