logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Directory index forbidden by Options directive
Author
rkorebrits



Joined: 16 Aug 2011
Posts: 11
Location: Cape Town, South Africa

PostPosted: Wed 31 Aug '11 11:58    Post subject: Directory index forbidden by Options directive Reply with quote

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: 7323
Location: Germany, Next to Hamburg

PostPosted: Wed 31 Aug '11 16:51    Post subject: Reply with quote

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

PostPosted: Wed 31 Aug '11 16:52    Post subject: Reply with quote

Yep..

Code:
DirectoryIndex index.php index.html
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7323
Location: Germany, Next to Hamburg

PostPosted: Wed 31 Aug '11 20:14    Post subject: Reply with quote

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

PostPosted: Thu 01 Sep '11 11:22    Post subject: Reply with quote

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: 7323
Location: Germany, Next to Hamburg

PostPosted: Thu 01 Sep '11 17:04    Post subject: Reply with quote

Sorry, I was confused that you are you from the mails Wink

I can reach that project without any issue. (wordpress.*)
Back to top
rkorebrits



Joined: 16 Aug 2011
Posts: 11
Location: Cape Town, South Africa

PostPosted: Thu 01 Sep '11 17:07    Post subject: Reply with quote

James Blond wrote:
Sorry, I was confused that you are you from the mails Wink

I can reach that project without any issue. (wordpress.*)


That's ok Smile

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: 7323
Location: Germany, Next to Hamburg

PostPosted: Thu 01 Sep '11 17:40    Post subject: Reply with quote

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

PostPosted: Fri 02 Sep '11 9:15    Post subject: Reply with quote

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: 7323
Location: Germany, Next to Hamburg

PostPosted: Fri 02 Sep '11 13:56    Post subject: Reply with quote

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

PostPosted: Fri 02 Sep '11 14:01    Post subject: Reply with quote

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: 7323
Location: Germany, Next to Hamburg

PostPosted: Fri 02 Sep '11 14:36    Post subject: Reply with quote

Yes you can figure that out. But for that you have to change the logging format and using %v. please see http://httpd.apache.org/docs/current/mod/mod_log_config.html#formats for this.
Back to top


Reply to topic   Topic: Directory index forbidden by Options directive View previous topic :: View next topic
Post new topic   Forum Index -> Apache