Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Running apache on Fedora.

My virtual host config looks like :


  DocumentRoot /var/www/admin/public
    <Directory "/var/www/admin/public">
      Options Indexes FollowSymLinks
      AllowOverride All   
      Order allow,deny
      Allow from all
  DocumentRoot /var/www/meatball
  DirectoryIndex index.html

The first vhost works like a champ. When I resolve the meatball address, the browser opens the right folder, but displays a directory listing, instead of opening the index file.

share|improve this question
Hate to ask the obvious question but. . . have you restarted Apache? – Rilindo Oct 12 '11 at 15:47
yessir, definitely restarted apache. . . – TuK Oct 12 '11 at 15:49
You may want to try clearing yourbrowser cache. When I try I get connected and redirected to a worldpress install/blog. – Iain Oct 12 '11 at 18:00
Fixed it. . . it turned out to be a depreciated DirectoryIndex directive hidden away in the main conf file. Looks like a virtual host directive will not override a directive specified in the main conf. Stackexchange wont let me answer my question for another 4 hours. (Not enough rep) Thanks for all the help though ;) – TuK Oct 12 '11 at 18:27
up vote 2 down vote accepted

Found it. . . there was another DirectoryIndex directive buried in the conf file, that was set to index.php. Apparently a directive specified in a virtual host does not overwrite directives specified in the 'main configuration'.

share|improve this answer

Could you check your logs ? You will maybe see an error (file not openable, directory not readable...). If you type the URL with the end with index.html, is it working ? Your index is not PHP or something else ?

share|improve this answer

Your Answer


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.