use*_*443 3 reverse-proxy nginx
我尝试设置 nginx 来验证传入的 https 请求并将它们传递到同一 Intranet (LAN) 中不同主机上的服务器。我从不同的来源得到了以下 conf 文件:
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwared-For proxy_add_x_forwarded_for;
upstream syncthing_gui
{
server 10.0.0.129:8329;
}
server {
listen 443 ssl;
server_name geras.duckdns.org;
ssl on;
ssl_certificate /etc/letsencrypt/live/geras.duckdns.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/geras.duckdns.org/privkey.pem;
auth_basic "Username and Password required (syncthing)";
auth_basic_user_file /etc/nginx/.htpasswd;
location /sync {
error_log /var/log/nginx/error.log info;
access_log /var/log/access.log;
proxy_pass http://syncthing_gui;
}
Run Code Online (Sandbox Code Playgroud)
}
但我得到了错误400 Bad Request: too many Host headers
。我需要改变什么?
归档时间: |
|
查看次数: |
3516 次 |
最近记录: |