Showing posts with label nano. Show all posts
Showing posts with label nano. Show all posts

Wednesday, August 26, 2015

How to Change Apache 2 Index.html


Log in to the remote server through SSH, or open a terminal window if you are located with the server.
Type 'cd /etc/apache2' at the terminal prompt to change to the Apache 2 directory where the configuration files are stored.
Open 'apache2.conf' in a text editor such as vi, pico or nano. Search for the 'DirectoryIndex' line, which will look similar to the following:DirectoryIndex index.html index.cgi index.pl
Edit the line to include new filenames, or remove existing pages. For example, you could change the directive to:DirectoryIndex index.php index.htmFiles are searched in the order which they appear, so the first file matching a name in the list will be displayed to the visitor. Save the file and close the text editor.
Restart Apache by typing '/etc/init.d/apache2 restart' at the terminal prompt.
VPS Hosting