Your browser sent a request that this server could not understand. Additionally, a 400 Bad Request e

本文探讨了在尝试访问特定域名时遇到的BadRequest错误,并分享了一个StackOverflow上的解决方案,指出配置中的_字符可能导致此问题,通过调整DocumentRoot路径或upstream名称中的_,可以解决错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

访问域名报如下错误

Bad Request
Your browser sent a request that this server could not understand.
Additionally, a 400 Bad Request error was encountered while trying to use an ErrorDocument to handle the request.

Apache Server at xxx.com Port 80

Stack Overflow上搜的回答

In my case, it's actually the underscore _ in DocumentRoot that causes problem and hours of debugging. All work fine once I remove it from my DocumentRoot path.

简言之,有可能是配置中存在错误,是否存在“_”。

我是upstream名称中用了”_”,去掉,重启nginx就可以访问了。

原回答见:https://stackoverflow.com/questions/43925672/bad-request-your-browser-sent-a-request-that-this-server-could-not-understand

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值