ngixn 部分目录代理到另一台服务器相关目录上

假设现在服务器正跑着http://www.firsrt.com,要加一个网址http://www.firsrt.com/second/访问,可以在nginx的配置文件nginx.conf里加上二级目录的设置

server {

        listen       80;

        server_name  www.first.com;

        location / {

            root   /workspace/first;

             index index.html index.php index.htm index;

        }

 

        location /second {

    proxy_pass http://xxxxx/second

      

        }

location /Three {

    proxy_pass http://xxxxx/Three

         

        }

 

    }

posted @ 2019-12-06 18:23  星云惊蛰  阅读(982)  评论(0)    收藏  举报