Apache: How to enable Directory Index browsing at the Doc Root level?
Posted
by
Brian Lacy
on Server Fault
See other posts from Server Fault
or by Brian Lacy
Published on 2011-02-08T21:35:14Z
Indexed on
2011/02/08
23:27 UTC
Read the original article
Hit count: 254
apache
|virtualhosts
I have several web development projects running on Fedora 13. I generally setup Apache to serve my larger projects as Virtual Hosts, but I've got several small projects cycling through that I don't really care to setup a VirtualHost for each one. Instead I'd like them all under a subdirectory of the main VirtualHost entry. I just want Apache to serve me the directory index when I browse to the host name.
For example, the hostname projects.mydomain.com
refers to /var/www/projects
, and that directory contains only subdirectories (no index file).
Unfortunately when I browse to the host directly I get:
Forbidden
You don't have permission to access / on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
But my virtual host entry in my apache config looks like this:
<VirtualHost *>
ServerName projects.mydomain.com
DocumentRoot /var/www/projects
<Directory "/var/www/projects">
Options +FollowSymlinks +Indexes
AllowOverride all
</Directory>
</VirtualHost>
What am I missing here?
© Server Fault or respective owner