← 返回博客列表
nginx路由失败
我想实现访问地址 https://my.website.com/test 时,路由到 http://127.0.0.1:17722。
但却访问到了http://127.0.0.1:17722/test
我的配置如下:
server {
...
location /test {
proxy_pass http://127.0.0.1:17722;
}
...
}
**如何改?只要在proxy_pass配置的地址末尾加上/**即可。
server {
...
location /test {
proxy_pass http://127.0.0.1:17722/; //注意引号前面有个/
}
...
}