APACHE WEBSERVER PART -2

Apache Web Server - Change the Default Page

KB ID 0000882 Dtd 23/11/13

Problem

Out of the box, Apache expects your website homepage to be called index.html, on this site the homepage is called home.html, here's how to change it.

Solution

1. Connect to the server via SSH, (or open a terminal session). The file you need to edit is called httpd.conf. This server is running CentOS, so you should find that file in the /etc/httpd/conf folder.
Change Apache Default webpage
2. I'm going to edit it with nano.
Change Apache Default Landing Page
3. Locate the DirectoryIndex section and remove index.html and any other unwanted filename (i.e. in this example index.html.var).
Change Apache Default main page
4. Add in the one you require and save and exit, (press CTRL+X and Y to save).
-Change Apache Default Web Page
5. You nee to restart Apache for the change to take effect.
apachectl -k restart
Restart Apache Web Server

No comments:

Post a Comment