Nginx反向代理HTTPS
Nginx Server 设置
例如 转发到 https://127.0.0.1:8848
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| location ~/ { resolver 8.8.8.8 114.114.114.114 valid=10s; resolver_timeout 3s; 假如你要代理到 127.0.0.1:8848 set $target "127.0.0.1:8848"; proxy_set_header Host $host; proxy_set_header X-Forwarder-For $remote_addr; proxy_ssl_certificate /xxx.crt proxy_ssl_certificate_key /xxx.key proxy_pass https://$target; }
|