nginx 一个配置两个站点

# 配置前端访问路径

   #  第一个站点配置

   location / {
            root   /data/apps/hyd-web;
            index  index.html index.htm;
        }

       #  部署的后端访问地址和端口号
        location /dev-api/ {
                proxy_pass http://127.0.0.1:15060/;
        }

# 第二个站点配置

        location /dev-new {
            alias   /data/apps/smart-hyd-web-new;
            index  index.html index.htm;
        }


        location /dev-new-api/ {
                proxy_pass http://127.0.0.1:15061/;
        }
 

Logo

快速构建 Web 应用程序

更多推荐