Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm getting a bunch of these errors in my error.log:

[client 1.2.3.4] proxy: no HTTP 0.9 request (with no host line) on incoming request and preserver hose set forcing hostname to be www.mydomain.com for uri /

My config is essentially:

ProxyRequests Off

<VirtualHost 1.2.3.4:80>
ServerName www.mydomain.com
DocumentRoot "c:/apache/htdocs"

ProxyPreserveHost On
ProxyPass / http://172.1.1.1/
</VirtualHost>

<VirtualHost 1.2.3.4:443>
ServerName www.mydomain.com
DocumentRoot "c:/apache/htdocs"
# SSL Stuff

ProxyPreserveHost On
ProxyPass / http://172.1.1.1/
</VirtualHost>

Anyone have an idea how to eliminate those warnings?

share|improve this question
    
Is the client address your server? –  Shane Madden Jun 20 '12 at 18:42
    
No, sorry. I just tried to anonymize the ip's to protect the guilty. –  ConsultUtah Jun 20 '12 at 19:01
    
Well, that warning just informs you that you have ProxyPreserveHost set and got a request with no Host header, so the server needed to improvise a header to send to the proxy backend. You can ignore the error, especially because those HTTP/0.9 clients are usually bots, not actual users. –  Shane Madden Jun 20 '12 at 19:04
    
OK. Looks like you are right. They are coming from a server iron and our monitoring servers. Thanks! Wanna post your answer as an answer and I'll mark it? –  ConsultUtah Jun 20 '12 at 19:30

1 Answer 1

up vote 2 down vote accepted

These warnings are just making the effort to inform you that Apache has done something not-quite-alright (injecting a Host header in a request that didn't have one) in an effort to make sure the client can access the proxied content.

Since ProxyPreserveHost On is set, Apache presumes that the backend server won't be ok with having a Host header of 172.1.1.1, nor does it really know how to speak HTTP/0.9 to the backend server.. so it's improvising a bit, in the hopes that it works correctly, but informing you of that.

Generally, these can be ignored, which can unfortunately add noise to your logs. Additionally, it's extraordinarily rare that a request like this comes from a human's web browser (the exception being possibly some older proxies); more likely it's a bot of some sort.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.