
我想实现访问
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 为什么不可行....
1 exuxu OP ~ 沉了 ~ |
2 h4lbhg1G Jan 5, 2018 其实这种你可以开一个`nc -l 3000`调试下,看看打过去的是啥。因为两个都有结尾的 /,那么实际上应该相当于访问的`http://127.0.0.1:3000/xxxxxx` 。 优雅的小尾巴:欢迎使用和 star 我的命令行工具 https://github.com/rexdf/CommandTrayHost |