RT 想设置两个不同的前端项目访问不同的静态资源,但是不知道如何设置,例如
wechat 访问 wechat 路径下的 css 和 js 文件
manager 访问 manager 路径下的 css 和 js 文件
Nginx 配置中 用了好几种正则和直接目录访问 但是都无效, 使用通配符的话就没法返回指定的 js
// 请把代码文本粘贴到下方(请勿用图片代替代码)
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;
}
蝴蝶不菲
随时随地看视频慕课网APP
相关分类