vue.js vue-router history模式路由,域名二级目录子目录nginx配置

修改三个配置,具体操做往后有时间更新,不懂私聊
1html

const route = new Router({
  mode: 'history',
  base: '/doctor-html/',
  routes
})

2nginx

assetsPublicPath: '/doctor-html/',

3web

try_files $uri $uri/ /doctor-html/index.html;

4
项目目录配置实例
项目路径web/doctor-html/index.html
nginx配置root指向 web/ 项目放在doctor-html,可是nginx指向web,url访问com/doctor-html就行了url

相关文章
相关标签/搜索