I use apache2 to host the site. My directory has index.html and index.php.
I open /etc/apache2/apache2.confand add the line:
DirectoryIndex index.php index.html index.htm
Then restart apache2. But when I open localhost/~username, it accesses index.html.
I look around but cannot find the problem. My httpd.conf is empty and I do not have a .htaccess file.
Where can I hide the setting?
Edit : after I change /etc/apache2/mods-availiable/dir.conf, it finds index.php.
But WHY apache2.conf cannot overwrite dir.conf ?!
source
share