Apache Error After Update: client sent HTTP/1.1 request without hostname

6.8k views Asked by At

I just updated my CentOS 6.9 virtual machine, which is running Apache 2.2.15. Suddenly, the Apache is too "picky" to respond to browsers. ANY browser. Error log reads:

client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23):

etc.

I changed nothing except to update the system, as every Security Guru on the planet tells us to do to make sure we always have the latest security patches. Some research reveals the message means the client did not send a "Host" header. Well if this is the cause, it's gone unnoticed for a good while.

To confirm the problem was actually caused in the update, I rolled it back. So now it works as before, i.e., correctly. Or, if not 100% "correctly", it does at least work.

FYI, if somebody reads this for a similar problem, you can roll your update back (assuming you used "yum update" to update your system):

# yum history

The history is listed in reverse order, the most recent first, with an ID number in the left-most column. Rollback as follows:

# yum undo ID

My Working Version (after rolling back the update)

# httpd -v
Server version: Apache/2.2.15 (Unix)
Server built:   Mar 22 2017 06:52:55

My Unworking Version (when updated)

# httpd -v
Server version: Apache/2.2.15 (Unix)
Server built:   Aug 15 2017 19:44:58

Right, so between March and August, apparently the "Hostname" header became mandatory.

OK, maybe the "update" happened to "fix" something, but said "fix" happened to break everything else. Or at least, it rendered a reasonably good system completely inoperable.

So my question for the good people of StackOverflow is two-fold.

First, what did I do wrong? And how do I fix it to do it right? I do want to have the latest fixes, but not if it breaks everything else.

Second, can I maybe get some Security Guru to admit that maybe it's not always a great idea to update your system every frikkin time a patch is made available?

1

There are 1 answers

3
Dave DeCarlo On

I had the same issue when yum updating. Do you by chance have an underscore in your domain? I am not sure why but this seemed to create the same error

client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23):

I also had to downgrade but noticed URLs without underscores worked fine. HTH