Debugging Apache Bad Request

I got the following error this morning:


Bad Request

Your browser sent a request that this server could not understand.

Additionally, a 400 Bad Request error was encountered while trying to use an ErrorDocument to handle the request.


I didn't see anything in the Apache log file, so I increased the LogLevel from warn to debug: LogLevel debug. Turns out I was using an underscore (_) in my URL!

Apache log:
AH02415: [strict] Invalid host name 'some_test.dev', problem near: _test.
AH00550: Client sent malformed Host header: some_test.dev

comments powered by Disqus