我想实现访问
ip 解析到 www.test.com
www.test.com/sub1
www.test.com/sub2
nginx 用的是以下(简化)配置
server {
listen 80;
server_name www.test.com;
location /sub1/ {
proxy_pass http://127.0.0.1:3000/;
}
location /sub2/ {
proxy_pass http://127.0.0.1:4000/;
}
}
端口 3000 的服务全程是 http://www.test.com/sub1/xxxxxxx 为什么不可行....