千辛万苦在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;
}
}
原文:https://www.cnblogs.com/spikespiegel5112/p/13019488.html