【发布时间】:2020-03-28 21:42:18
【问题描述】:
我正在尝试将 vue.js 和 Django 与 nginx 一起使用。问题是,它仍然将我的 /subscriptions/ url 重定向到 Django。删除“/”规则会使其工作。当 url 匹配“自定义”时,有没有办法“跳过”Django?
基本上,我想指定哪些链接将与 vue 一起使用,其余的将与 Django 一起使用。
location = /custom/ {
root /home/django/project/frontend/dist;
index /index.html;
}
location / {
include proxy_params;
proxy_pass http://unix:/home/django/project/project.sock;
}
【问题讨论】: