Why can't I get rid of default index.html even if I disable the default virtual host in Apache2?

Posted by Emre Sevinç on Server Fault See other posts from Server Fault or by Emre Sevinç
Published on 2010-05-30T12:42:08Z Indexed on 2010/05/30 12:54 UTC
Read the original article Hit count: 363

Filed under:
|

I have created a virtual host settings file and I disabled the default settings by using a2dissite default (this is a pretty standard Ubuntu 10.04 installation). But no matter what I try my Apache2 server simply keeps on displaying the default index.html page instead of the index.php page that I set up in the virtual host file. Can someone help me what I'm missing. Details follow:

No default settings:

ls -l /etc/apache2/sites-enabled/
total 0
lrwxrwxrwx 1 root root 51 May  5 13:32 webmin.1273066327.conf -> /etc/apache2/sites-available/webmin.1273066327.conf
lrwxrwxrwx 1 root root 34 May 30 11:03 www.accontax.be -> ../sites-available/www.accontax.be

Contents of the relevant virtual host:

cat /etc/apache2/sites-enabled/www.accontax.be

<VirtualHost *>
    ServerName  www.accontax.be
    ServerAlias accontax.be

    DirectoryIndex index.php
    DocumentRoot /var/www/drupal/

    <Directory /var/www/drupal/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride None
            Order allow,deny
            allow from all
    </Directory>
</VirtualHost>

Contents of httpd.conf:

cat /etc/apache2/httpd.conf

Listen 80
NameVirtualHost *

I also have those relevant lines in my apache2.conf:

# Include generic snippets of statements
Include /etc/apache2/conf.d/

# Include the virtual host configurations:
Include /etc/apache2/sites-enabled/

When I visit http://www.accontax.be I expect apache2 server go to the /var/www/drupal subdirectory and start serving index.php but it simply keeps on serving index.html from /var/www directory. I have reloaded the configuration, restarted the server, deleted my browser cache. Nothing changed.

Probably I'm missing a simple yet crucial step but I just could not find it.

© Server Fault or respective owner

Related posts about virtualhosts

Related posts about apache-config