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 编辑过 |
关键字查询
相关文章
正在查询... |