/conf ---> nginx.conf文件中, 加入代码: include local.windons.com.conf。 local.windons.com.conf该文件为具体反向代理配置文件, 文件名随便起, 内容: server { listen 80; root /; server_name local.windons.com; -----> 代理目标地址, 需要在HOSTS文件中与之匹配。 #location ~ /(public|template) { # proxy_pass_header Server; # proxy_set_header Host $http_host; # proxy_set_header X-Real-IP $remote_addr; # proxy_set_header X-Scheme $scheme; # proxy_pass http://192.168.2.37; #} location / { proxy_pass_header Server; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Scheme $scheme; proxy_pass http://127.0.0.1:8081; -----> 配置代理的IP级端口 } } /contrib /docs /html /logs ---> 查看日志 /temp nginx.exe run.bat ---> 双击运行
- 1
- 粉丝: 487
- 资源: 48
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助