Apache returns 403 but logs a 200 response?

I’ve got a very weird problem. Apache seems to refuse to serve me certain files, giving me a 403 response. There’s no htaccess on the site.

The extra weird thing is, the apache log is showing a 200 response:

xxx.xxx.xxx.xxx - - [11/Apr/2016:16:52:04 +0100] “GET /reset2.css HTTP/1.0” 200 243 “-” “Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36”

Are there any circumstances which can cause apache to return a 403 but log a 200?

If the Forbidden page isn’t returning 403 HTTP headers, the Forbidden page is Found.

This often happens when errors are directed to return a custom error page.

Yet you have no htaccess file, so it doesn’t make sense to me if you are seeing the default Apache error message.

Turns out it was just a simple permissions issue. I’m not sure why Apache was logging a 200 response though, but it’s sorted now, anyway.

1 Like

Probably it’s because answer code was logged before actual file access (where the error was occured)
I’d have the same issue on my own more that once, so I’m always checking file permissions first and Apache config later!

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.