今天小编在搭建完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是服务器错误