Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

QUESTIONs

I'd like to know

  • why I am getting Network error: 403 Forbidden in firebug for files that I am not trying to access?

  • is it likely to cause any serious problems on the webserver?

  • how to fix it.

  • Why is my browser trying to access those files in the error message?

DETAILS

I’m using wampserver 2.2 to access a folder via the browser. The browser is on the same computer as the server. The computer is running windows 7 ultimate.

When I view a web folder via my browser hXXp://localhost/folder

I can see the folder contents ok enter image description here

but in firebug I get Network error: 403 Forbidden

enter image description here

I’m not deliberately trying to access those files in the error msgs. You will notice they are in a completely different folder to the one I am looking at.

I check the apache_error.log and see

[Wed Sep 26 00:05:10 2012] [error] [client 127.0.0.1] client denied by server configuration: C:/apache2, referer: hxxp://localhost/folder/

Wampserver 2.2 is installed on D drive.

I took a look at the httpd.conf file but I couldn't find any references to c:

When I look in Apache’s access.log I see

127.0.0.1 - - [26/Sep/2012:00:05:10 +0900] "GET /icons/blank.gif HTTP/1.1" 403 217
127.0.0.1 - - [26/Sep/2012:00:05:10 +0900] "GET /icons/back.gif HTTP/1.1" 403 216
127.0.0.1 - - [26/Sep/2012:00:05:10 +0900] "GET /icons/text.gif HTTP/1.1" 403 216
127.0.0.1 - - [26/Sep/2012:00:05:10 +0900] "GET /icons/unknown.gif HTTP/1.1" 403 219
127.0.0.1 - - [26/Sep/2012:00:05:10 +0900] "GET /icons/folder.gif HTTP/1.1" 403 218

CONFIGURATION

  • Wampserver 2.2 installed on Drive D
  • Apache 2.2.22
  • PHP 5.4.3
  • MySQL 5.5.24
  • Firebug 1.10.3
  • Firefox 15.0.1
share|improve this question

2 Answers 2

up vote 3 down vote accepted

You have Options Indexes turned on somewhere in your configuration. That is what causes Apache to generate the page you are seeing above.

That page is made up of HTML and to the left of each item (where you see [ ] and [TXT] etc.) would normally appear an image representing the type of file that line is for. These images are requested, just like with any normal HTML page and they come from /icons/. This isn't actually a folder in your webroot but is aliases using something like Alias /icons/ "/usr/share/apache2/icons/".

Lastly, you have configured some other part of your Apache configuration to not allow these requests, hence you end up with a 403 response and the alt-text being displayed instead of the icons.

This is not likely to cause any serious problems but it's not something you would normally leave active (either Options Indexes or Alias /icons/ ...) on a production server.

share|improve this answer
    
That makes a lot of sense. For the moment, I will leave it, but definitely I'll turn it off before putting the site live. Thanks for the help! –  moomoochoo Sep 26 '12 at 2:53

To fix the icon problem, I had to edit httpd-autoindex.conf located in \bin\apache\apache2.2.22\conf\extra

I changed

Alias /icons/ "c:/apache2/icons/"

to

Alias /icons/ "D:/wamp/bin/apache/apache2.2.22/icons/"

and

<Directory "c:/apache2/icons">

to

<Directory "D:/wamp/bin/apache/apache2.2.22/icons/">

The icons will now display as per usual.

Many thanks to Ladadadada for pointing me in the right direction!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.