欢迎您访问 最编程 本站为您分享编程语言代码,编程技术文章!
您现在的位置是: 首页

nginx返回400状态码

最编程 2024-01-16 10:30:30
...

分析:

1.后端地址正常返回200;

2.确认是url加上参数后,nginx返回400,并且nginx除了400状态码的访问日志,没有输出其他异常日志;

nginx地址:

https://test.com/test/and/ip:123/~~/ent%5B@uri=%2tel:1%5D/code

解决方案:

在proxy_pass的跳转路径后新增$request_uri

location /test/ {
    proxy_pass http://192.168.1.11$request_uri;
}

参考文档:

Module ngx_http_proxy_module