組態檔:
{listen 80;
server_name www.123.com;
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
location / {
root /usr/share/nginx/html;
proxy_pass http://127.0.0.1:8088;
index 1.html;
}
host檔案里修改了域名映射192.168.1.7 www.123.com
沒加proxy_pass的時候就可以正常訪問192.168.1.7:80,只要一加上再訪問就是404
有大佬可以幫忙看下為什么嗎
uj5u.com熱心網友回復:
反向代理去掉 root 和 indexuj5u.com熱心網友回復:
location / {root /usr/share/nginx/html;
index 1.html;
}
location /proxy {
proxy_pass http://127.0.0.1:8088;
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/76110.html
標籤:Web 開發
上一篇:專案打包后運行出錯
下一篇:CodeRunner
