一臺nginx反向代理,有2個location 代理不同的地址,有一臺是靜態頁面代理,做完之后一臺的訪問不了問題出現的平臺版本及自己嘗試過哪些方法相關代碼// 請把代碼文本粘貼到下方(請勿用圖片代替代碼)server { listen 8800; server_name localhost; location /rms{ root html; index index.html index.htm; add_header 'Access-Control-Allow-Origin' '*'; add_header Access-Control-Allow-Methods GET,POST,OPTIONS,DELETE; add_header 'Access-Control-Allow-Headers' 'userId,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type'; proxy_pass http://9.1.8.249:8082/rms ;
} location /rizhiyi/ { root html; alias /; index index.html index.htm; proxy_pass http://9.1.8.76/;
} location ~* ^/(rizhiyi|images|img|javascript|js|css|blog|flash|media|static|api|auth|account|ico)/ { proxy_pass http://9.1.8.76:80;
}
- 1 回答
- 0 關注
- 447 瀏覽
添加回答
舉報
0/150
提交
取消