nginx
主页 > 服务器 > nginx >

Nginx HTTP Status 400 –错误的请求问题解决

2025-01-14 | 佚名 | 点击:

第一:实验故障

今天小编在搭建完Nginx反向代理两个Tomcat站点,实现负载均衡的实验,访问网页内容时,提示如下报错:

HTTP Status 400 – 错误的请求Type 异常报告
消息 The character [_] is never valid in a domain name.
描述 The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).

第二:故障原因

根据浏览器报错的提示消息,意思为:在一个域名中使用字符“_”是不正确的;原来问题出在了nginx主配置文件中给后端tomcat服务器池起的名字上,不支持下划线

第三:解决方法

将下划线改成“-”,再重新启动nginx服务就没问题了。

在这里插入图片描述

补充知识:

НТТР状态码

4xx是客户端错误,5xx是服务器错误

原文链接:
相关文章
最新更新