1、修改路由配置
const createRouter = () => new Router({
mode: 'history',
base: '/manage',
routes
})
2、修改配置文件
cli2构建的项目
module.exports = {
assetsPublicPath: '/manage/'}
cli3构建的项目
module.exports = {
publicPath: '/manage/'
}
3、nginx配置
server {
listen 8080;
server_name localhost;
location /view{
alias /home/ubuntu/vue/conferencingmanagement;
try_files $uri $uri/ /manage/index.html;
index index.html index.htm;
}
location /manager{
alias /home/ubuntu/vue/conferencingmanagement;
try_files $uri $uri/ /manage/index.html;
index index.html index.htm;
}
}