Changing The Default Webpage On The Apache Web Server

By default, Apache uses index.html as its default webpage, that is, if you type nothing after the server's IP address or name, then index.html will be displayed. If you wish to change this to something else, perhaps you want your homepage to be a PHP file, then you need to change Apache's configuration.

At the Pi command line, edit the Apache configuration file httpd.conf.

sudo nano /etc/apache2/httpd.conf

Now change, or insert, the entry for DirectoryIndex index.php. Save the changes and exit. To make these changes live, you need to restart Apache so that it reloads the new configuration.

sudo /etc/init.d/apache2 reload

You should now have your default home page set to index.php.