We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nginx 下配置多个 vue 项目,或者说非根目录下的配置
nginx
vue
举例:
https://www.yoursite.com/blog
https://www.yoursite.com/test
vue-router 设置 base 路径
vue-router
base
base: '/blog'
config/index.js 修改 assetsPublicPath
config/index.js
assetsPublicPath
assetsPublicPath: '/blog/'
location /blog { try_files $uri $uri/ /blog/index.html; }
The text was updated successfully, but these errors were encountered:
location /blog { try_files $uri $uri/ /blog/index.html; } location /test { try_files $uri $uri/ /test/index.html; } 不是这样配置么???
Sorry, something went wrong.
@hu949277923 额,有区别吗? test 和 blog 一样就没写了
test
blog
有没有试过不需要每个新项目都去添加nginx配置的方式
No branches or pull requests
nginx配置多个vue项目
需求
nginx
下配置多个vue
项目,或者说非根目录下的配置https://www.yoursite.com/blog
https://www.yoursite.com/test
vue项目中配置
base: '/blog'
assetsPublicPath: '/blog/'
nginx配置
The text was updated successfully, but these errors were encountered: