同一个端口,不同路径配置, 非根路径时,要将root替换为alias
location / {
root html;
index index.html index.htm;
}
location /easyform {
alias /var/www/work/dist/;
index index.html index.html;
}
新增端口配置
server {
listen 81;
server_name localhost;
location / {
root /var/www/work/dist;
index index.html index.htm;
}
}
代理配置
location / {
proxy_pass http://127.0.0.1:3000;
}
网友评论