1.nginx.conf配置
server {
listen 80;
server_name www.gwzhjc.com;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html/web3;
index index.html index.htm;
}
location /prod-api/ {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:9001/;//后端访问地址
}
}
2.配置hosts环境
地址:C:\Windows\System32\drivers\etc下hosts文件,没有就创建