Forum Moderators: phranque

Message Too Old, No Replies

403, but 200 in access log

non-redirected access to root is always logged with 200

         

thetrasher

2:29 pm on Dec 5, 2006 (gmt 0)

10+ Year Member



Apache is always logging code 200 for access to root. Access directly to /index.php is logged correctly. There is no .htaccess file and no known redirection.

Where could be the error in Apache configuration? Log files on other shared servers are correct.

index.php:

<?php
header('HTTP/1.1 403 No');
header('Content-Length: 0');
?>

Answer:

HTTP/1.1 403 Forbidden
Date: Tue, 05 Dec 2006 10:45:46 GMT
Server: Apache
X-Powered-By: PHP/4.3.10-16
Content-Length: 0
Content-Type: text/html; charset=iso-8859-1

access_log:

(...) "GET / HTTP/1.1" 200 0 (...)

(...) "GET /index.php HTTP/1.1" 403 0 (...)

jdMorgan

3:27 pm on Dec 5, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What version of Apache?
Who configured this server?

Jim

thetrasher

6:42 pm on Dec 5, 2006 (gmt 0)

10+ Year Member



From phpinfo():
Apache Release 10333100

It's shared hosting (>100 sites), thus server is configured by hosting provider. I wonder if I'm the only one who reads logs.

Is it a known bug in old Apache 1.3 or did my hoster mistakes in configuration?