問題描述RT 想設(shè)置兩個不同的前端項目訪問不同的靜態(tài)資源,但是不知道如何設(shè)置,例如wechat 訪問 wechat 路徑下的 css 和 js 文件manager 訪問 manager 路徑下的 css 和 js 文件問題出現(xiàn)的環(huán)境背景及自己嘗試過哪些方法Nginx 配置中 用了好幾種正則和直接目錄訪問 但是都無效, 使用通配符的話就沒法返回指定的 js相關(guān)代碼// 請把代碼文本粘貼到下方(請勿用圖片代替代碼)你期待的結(jié)果是什么?實際看到的錯誤信息又是什么?server { listen 80; server_name 127.0.0.1; root /opt/; location / { try_files $uri @gunicorn_proxy;
} location @gunicorn_proxy { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_pass http://localhost:5000;
} location /wechat/ { index index.html; try_files $uri $uri/ /index.html;
} location /manager/ { index index.html
try_files $uri $uri/ /index.html;
}
- 1 回答
- 0 關(guān)注
- 2454 瀏覽
添加回答
舉報
0/150
提交
取消