[CentOS] Directory index forbidden by rule: /var/www/html/

Tomas Ruprich ruprich at uikt.mendelu.cz
Tue Oct 9 15:56:09 UTC 2007

Directory index is a feature of apache, which:
 - if there is a file named in DirectoryIndex directive (usually
   index.html) in the requested directory, then show it (i think this is
made by mod_dir)
 - if not, then create a list of files, if you have mod_autoindex loaded
   and Options +Indexes in directory configuration
(I recommend http://httpd.apache.org/docs/2.2/mod/mod_dir.html and

I believe, this comes because your /var/www/html contains no index
mentioned in DirectoryIndex rule. What is the content of /var/www/html?

best regards
  Tomáš Ruprich                                       ruprich at uikt.mendelu.cz
  tel.: +420 545 132 885, +420 602 127 744

Tue, Oct 09, 2007 ve 08:34:21AM -0700, Rogelio Bastardo napsal:
> I'm looking to troubleshoot this error when I run "tail
> /etc/httpd/logs/error_log"
> [Tue Oct 09 07:22:59 2007] [error] [client] Directory index
> forbidden by rule: /var/www/html/
> (I get this when I run Nagios' "./check_http -H".)
> All I did was install CentOS and then modify httpd.conf to include
> "ServerName" and also run " htpasswd -c
> /etc/nagios/htpasswd.users nagiosadmin".
> Is this a permissions issue on my /var/www/html/ folder?
> I tried to get the Apache page to serve properly, and it's not doing that.
> And when I try from another computer, I don't see anything in the logs,
> which made me think it was an IPTABLES issue (which it doesn't appear to
> be).
> Chain RH-Firewall-1-INPUT (2 references)
> target     prot opt source               destination
> ACCEPT     all  --  anywhere             anywhere
> ACCEPT     icmp --  anywhere             anywhere            icmp any
> ACCEPT     ipv6-crypt--  anywhere             anywhere
> ACCEPT     ipv6-auth--  anywhere             anywhere
> ACCEPT     udp  --  anywhere            udp dpt:5353
> ACCEPT     udp  --  anywhere             anywhere            udp dpt:ipp
> ACCEPT     all  --  anywhere             anywhere            state
> RELATED,ESTAB                 LISHED
> ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp
> dpt:s                 sh
> ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp
> dpt:h                 ttp
> ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp
> dpt:f                 tp
> ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp
> dpt:s                 mtp
> REJECT     all  --  anywhere             anywhere            reject-with
> icmp-ho                 st-prohibited

> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos

More information about the CentOS mailing list