You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Nolan Rumble <li...@physics.sun.ac.za> on 2006/06/28 15:09:23 UTC

[users@httpd] DirectoryIndex not working

Hi,

I'm running a website on apache.  I have an index.html in /link.  When I 
request the following link: http://localhost/link/ It gives me a Forbidden 
error message.  However if I rename the index.html to index.htm, the link: 
http://localhost/link/ works without any problems

This would lead one to believe that the problem lies with DirectoryIndex. 
However, upon examining the httpd.conf file, I get the
following:
<IfModule mod_dir.c>
     DirectoryIndex index.htm index.html home.htm index.cgi index.pl 
Default.htm default.htm index.xml </IfModule>

Which should in theory solve the problem? ...but it does not :(

The permissions for all the directories and the files are what they should 
be so I can't seem to think that it's a permission problem.

I also checked the other configuration files and it turned out that the 
configuration file for php also had it's own DirectoryIndex.  So I 
commented out the original one in httpd.conf and prepended the index.htm, 
index.html, home.htm, Default.htm, default.htm to the php's 
DirectoryIndex.  This still gave me the same problem.

As for .htaccess files, there are none.  If I create my own .htaccess file 
with Options Indexes, then it displays the directory listing.  Once there 
I can click on the file and it loads the webpage normally...but I'm trying 
to avoid that option like the plague :)

What am I missing?

Thanks
Nolan


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] DirectoryIndex not working

Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
On 28.06.06 16:16, Nolan Rumble wrote:
> [Wed Jun 28 16:14:55 2006] [error] [client xxx.xxx.xxx.xxx] Directory index
> forbidden by rule: /var/www/html/link/, referer: http://www.example.com

you must allow directory indexex by setting

Options +Indexes

for/in the specified directory.
-- 
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
99 percent of lawyers give the rest a bad name. 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] DirectoryIndex not working

Posted by Joshua Slive <jo...@slive.ca>.
On 6/28/06, Nolan Rumble <li...@physics.sun.ac.za> wrote:
> <snip>
>
> >
> > That's the access log.  What does the ERROR LOG say?
> >
>
> <snip>
>
> My apologies....it's been a long day!
>
> [Wed Jun 28 16:14:55 2006] [error] [client xxx.xxx.xxx.xxx] Directory index
> forbidden by rule: /var/www/html/link/, referer: http://www.example.com

That means that indeed the problem is with your DirectoryIndex
directive.  Make sure that you are looking in the correct config file
and that there aren't other DirectoryIndex directives overriding the
one you are looking at.  Also, remove the <IfModule> and </IfModule>
lines which just hide useful error messages.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] DirectoryIndex not working

Posted by Nolan Rumble <li...@physics.sun.ac.za>.
<snip>

> 
> That's the access log.  What does the ERROR LOG say?
> 

<snip>

My apologies....it's been a long day!

[Wed Jun 28 16:14:55 2006] [error] [client xxx.xxx.xxx.xxx] Directory index
forbidden by rule: /var/www/html/link/, referer: http://www.example.com

Thanks
Nolan



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] DirectoryIndex not working

Posted by Joshua Slive <jo...@slive.ca>.
On 6/28/06, Nolan Rumble <li...@physics.sun.ac.za> wrote:
>  <snip>
>
> >
> > What does the apache error log say?
> >
>
> <snip>
>
> host - - [28/Jun/2006:16:07:33 +0200] "GET /link/institute/ HTTP/1.1" 403
> 1004
> host - - [28/Jun/2006:16:07:33 +0200] "GET /link/institute/ HTTP/1.1" 403
> 1004 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4)
> Gecko/20060508 Firefox/1.5.0.4"
>
> That's the entry in the log that gets created everytime.

That's the access log.  What does the ERROR LOG say?

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] DirectoryIndex not working

Posted by Nolan Rumble <li...@physics.sun.ac.za>.
 <snip>

> 
> What does the apache error log say?
> 

<snip>

host - - [28/Jun/2006:16:07:33 +0200] "GET /link/institute/ HTTP/1.1" 403
1004
host - - [28/Jun/2006:16:07:33 +0200] "GET /link/institute/ HTTP/1.1" 403
1004 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4)
Gecko/20060508 Firefox/1.5.0.4"

That's the entry in the log that gets created everytime.

Thanks
Nolan


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] DirectoryIndex not working

Posted by Joshua Slive <jo...@slive.ca>.
On 6/28/06, Nolan Rumble <li...@physics.sun.ac.za> wrote:
> Hi,
>
> I'm running a website on apache.  I have an index.html in /link.  When I
> request the following link: http://localhost/link/ It gives me a Forbidden
> error message.  However if I rename the index.html to index.htm, the link:
> http://localhost/link/ works without any problems

What does the apache error log say?

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org