Author |
|
rkorebrits
Joined: 16 Aug 2011 Posts: 11 Location: Cape Town, South Africa
|
Posted: Wed 31 Aug '11 11:58 Post subject: Directory index forbidden by Options directive |
|
|
Hi Guys,
For some odd reason, i sporadically receive errors on pages that normally work fine. I don't know why, but sometimes it just craps out.. Do you guys have a clue what this could be?
It says 'Directory index forbidden', and that is right, it is forbidden. But I have also set 'DirectoyIndex' to index.php and that file is there. Why would it not pickup the index.php and throw this error?
error log:
[Wed Aug 31 10:31:15 2011] [error] [client 124.115.0.158] Directory index forbidden by Options directive: C:/apachewww/privatesites/www/
access log:
124.115.0.158 - - [31/Aug/2011:10:31:15 +0200] "GET / HTTP/1.1" 403 202
Windows server 2008 R2
apache 2.2.17
php 5.3.6 |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Wed 31 Aug '11 16:51 Post subject: |
|
|
Is there an index.php after DirectoryIndex in httpd.conf? |
|
Back to top |
|
rkorebrits
Joined: 16 Aug 2011 Posts: 11 Location: Cape Town, South Africa
|
Posted: Wed 31 Aug '11 16:52 Post subject: |
|
|
Yep..
Code: | DirectoryIndex index.php index.html |
|
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Wed 31 Aug '11 20:14 Post subject: |
|
|
What about the <Directory ... > stuff? Changed that to your documentroot? |
|
Back to top |
|
rkorebrits
Joined: 16 Aug 2011 Posts: 11 Location: Cape Town, South Africa
|
Posted: Thu 01 Sep '11 11:22 Post subject: |
|
|
Yep, I have set that up per domain (I sent my vhosts as an attachment to you in my last e-mail).
The weird thing is that it only seems to happen on 1 of the 4 projects that are installed on the server... I don't have a clue... |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Thu 01 Sep '11 17:04 Post subject: |
|
|
Sorry, I was confused that you are you from the mails
I can reach that project without any issue. (wordpress.*) |
|
Back to top |
|
rkorebrits
Joined: 16 Aug 2011 Posts: 11 Location: Cape Town, South Africa
|
Posted: Thu 01 Sep '11 17:07 Post subject: |
|
|
James Blond wrote: | Sorry, I was confused that you are you from the mails
I can reach that project without any issue. (wordpress.*) |
That's ok
Yes, overall, the site works fine, but now and then the error shows up.. Is there any way of finding out what the exact issue is? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Thu 01 Sep '11 17:40 Post subject: |
|
|
Compare the access log and error log and try to find out which client tried to access which url. |
|
Back to top |
|
rkorebrits
Joined: 16 Aug 2011 Posts: 11 Location: Cape Town, South Africa
|
Posted: Fri 02 Sep '11 9:15 Post subject: |
|
|
So here's a list of 5 random error's in the last night. What does "202" mean after 403? In the access log, most requests with 200 OK have 7561 behind them..
[Thu Sep 01 23:17:46 2011] [error] [client 123.125.71.95] Directory index forbidden by Options directive: C:/apachewww/privatesites/www/
123.125.71.95 - - [01/Sep/2011:23:17:46 +0200] "GET / HTTP/1.1" 403 202
(Baidu bot)
[Thu Sep 01 23:17:48 2011] [error] [client 220.181.108.171] Directory index forbidden by Options directive: C:/apachewww/privatesites/www/
220.181.108.171 - - [01/Sep/2011:23:17:48 +0200] "GET / HTTP/1.1" 403 202
(Baidu bot)
[Thu Sep 01 23:37:04 2011] [error] [client 173.225.17.50] Directory index forbidden by Options directive: C:/apachewww/privatesites/www/
173.225.17.50 - - [01/Sep/2011:23:37:04 +0200] "GET / HTTP/1.1" 403 202
[Thu Sep 01 23:42:44 2011] [error] [client 173.225.17.50] Directory index forbidden by Options directive: C:/apachewww/privatesites/www/
173.225.17.50 - - [01/Sep/2011:23:42:44 +0200] "GET / HTTP/1.1" 403 202
[Fri Sep 02 00:09:42 2011] [error] [client 66.249.72.175] Directory index forbidden by Options directive: C:/apachewww/privatesites/www/
66.249.72.175 - - [02/Sep/2011:00:09:42 +0200] "GET / HTTP/1.1" 403 202
(Google bot)
Edit
Also, How can I find out from what domain the error has come. The access and error log both constantly say the request was to '/'. But on which domain? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Fri 02 Sep '11 13:56 Post subject: |
|
|
the 202 are the bytes of the error document.
For figuring out it comes from: Create error log and access log in each domain.
e.g.
Code: |
...
</Directory>
ErrorLog logs/domain.error.log
LogLevel warn
CustomLog logs/domain.access.log combined
....
</VirtualHost>
|
|
|
Back to top |
|
rkorebrits
Joined: 16 Aug 2011 Posts: 11 Location: Cape Town, South Africa
|
Posted: Fri 02 Sep '11 14:01 Post subject: |
|
|
Does that also work with serveraliases? I have 1 domain for the project, but all individual sites are aliases.. I could set-up each domain seperately, but that's going to be much harder to manage? On 1 project we are expecting a couple hundred/thousand sites in a short time...
I've added you code for now, so at least the log files are seperated! |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
|
Back to top |
|