首页 > 其他 > 详细

nginx下通过子路径配置多个vue单页应用的方法

时间:2020-05-31 19:04:28      阅读:94      评论:0      收藏:0      [点我收藏+]

千辛万苦在Stack Overflow上找来的,记下吧。

https://stackoverflow.com/q/31519505/13651734

我的需求是

首页:/

项目a:/aaa

项目 b:/bbb

 

server {
    listen [::]:80 default_server;
    listen 80;
    server_name localhost mydomain 127.0.0.1;
    root C:/manager/houchejishi;

    location / {
        alias C:/manager/houchejishi/portal/dist/;
        index  index.html;
        try_files $uri $uri/ index.html =404;
    }

    location /h5 {
        alias C:/manager/houchejishi/h5/dist/;
        index  index.html;
        try_files $uri $uri/ index.html =404;
    }

    location /system {
        alias C:/manager/houchejishi/system/dist/;
        index  index.html;
        try_files $uri $uri/ index.html =404;
    }
}

 

nginx下通过子路径配置多个vue单页应用的方法

原文:https://www.cnblogs.com/spikespiegel5112/p/13019488.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!