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
}
}

浙公网安备 33010602011771号