windows:nginx配置https反向代理
當前位置:點晴教程→知識管理交流
→『 技術文檔交流 』
nginx配置文件路徑,根目錄/conf/nginx.conf,我這里是 C:\nginx-1.14.0\conf\nginx.conf,在修改之前,我們先將原始文件備份一份,復制拷貝nginx.conf,更名在nginx.conf.bak
server { listen 80; server_name www.test1.com; #輸入你的域名 location / { #root html; #index index.html index.htm; proxy_pass http://192.168.90.99:8080; #源服務器地址 proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } access_log logs/www.test1.com.log; #訪問日志路徑,將www.test1.com更改為你的域名,提高辨識度。 }
tips1:更改 nginx 配置文件后,需重啟 nginx 服務才能生效; tips2:配置https反向代理服務器,證書只需在反向代理服務器配置,源服務器配置常規 http 訪問即可。 ? 該文章在 2025/8/7 10:49:47 編輯過 |
關鍵字查詢
相關文章
正在查詢... |