Forum Discussion
Bastien_8356
Nimbostratus
Jul 14, 2011HTTP health monitor generate an apache error
Hi,
I configure the basic http health monitor (GET /\n\r) on my web servers, I have this in my apache error log :
[Thu Jul 14 13:39:44 2011] [error] [client x.x.x.x] Attempt to serve directory: /var/www/html/
Can you help me to get rid of any error, it's quite polluting my logs for nothing.
Thanks !!
7 Replies
- nathe
Cirrocumulus
Bastien
Looks like there's no file for the get to retrieve in the /var/www/html dir. How about adding a dummy index file in here? I know IIS uses index.html so perhaps try that? If you run curl from the f5 and attach to the pool member do you get an error? How about after you add an index file?
N - Hamish
Cirrocumulus
A couple of things........
1. Change the URI to request a file that actually exists... You probably have apache configured NOT to treat a request for / as a request for the default document (Usually index.html).
2. Add a protocol version. Otherwise the server will default to HTTP/0.9 and some versions of apache usually don't like v0.9...
So the request would normally be
GET / HTTP/1.0\r\n\r\n
You can add extra headers if you require (Such as host: etc).
H - Bastien_8356
Nimbostratus
With GET /blank.gif HTTP/1.1\r\nHost:\r\nConnection: Close\r\n\r\n , still the same - Hamish
Cirrocumulus
The exact same error?
There's numerous reasons for this apparenty (Not that I ever recall having it myself). But they all come down to a configuration problem on the apache server itself... Does that document actually exist? What does the access_log say?
H - James_Miller_44
Nimbostratus
I found that for http 1.1 you need to define your host. Like so.
GET / HTTP/1.1\r\nHost: myf5.domain.com\r\nConnection: Close\r\n\r\n - Hamish
Cirrocumulus
Yes. HTTP/1.1 included the previously optional host header as a mandatory item. For monitors it's not really worthwhile going to HTTP/1.1 (Unless you have some strange server that requires it :), as the monitor can't add the host header dynamically (Sadly), so you have to create a new monitor every time (It would be nice if you could specify a FQDN in a VS for attached monitors, but that creates problems in itself as monitors are attached to pools and not VS's.... That would possibly require re-architecting so you could instantiate a monitor per VS:Pool pairing... And have different poolmember status per attached VS... Or just a FQDN per pool maybe to use on the monitor...
Sorry... Rambling out loud again...
H - Your strings will vary a bit depending on your version. Check out this solution article, covers what you're looking for...
sol2167: Constructing HTTP requests for use with the HTTP or HTTPS application health monitor
http://support.f5.com/kb/en-us/solutions/public/2000/100/sol2167.html?sr=16769290
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects