DirectoryIndex Priority
For WHM version 11.38
(
Home >> Service Configuration >> Apache Configuration >> DirectoryIndex Priority)
You can use the
DirectoryIndex Priority feature to specify filenames that
Apache will recognize, and display, as index pages.
An “index page” is the page a visitor sees by default when he accesses a directory of a website. For example, a common index file is
index.html.
Using this feature, you are free to add new filenames as well as organize how
Apache will react if 2 index files are contained in a single directory. For example, if
Apache encounters an
index.html file and an
index.php file in the same directory, you can choose to show
index.html to the visitor rather than
index.php.
Add a new filename
- Click the Add button.
- Type the name of the index file you would like to add.
- You can name the new file type anything you wish.
-
Remember: It may be important to specify a file type here, for example, .html.
- Click OK.
- Click Save.
Note: You will need to rebuild and restart
Apache in order for your changes to take effect. You may click the
Rebuild Configuration and Restart Apache button on the following page to accomplish this.
Remove a filename
- Select the desired filenames to be removed from the list.
- Click Remove.
- Click Save.
Note: You will need to rebuild and restart
Apache in order for your changes to take effect. You may click the
Rebuild Configuration and Restart Apache button on the following page to accomplish this.
Organize filenames
- Select the filename you would like to move up or down.
- Click Move Up or Move Down to change the filename’s order.
-
Remember: Filenames located at the top of the list will take priority over another file name of a lower rank.
- Example: If you would like
index.html to appear rather than index.php, select index.html from the list and click Move Up until index.html is higher in the list than index.php.
- Click Save.
Note: You will need to rebuild and restart
Apache in order for your changes to take effect. You may click the
Rebuild Configuration and Restart Apache button on the following page to accomplish this.
If you prefer, you can leave
Apache running and and restart it manually at a later, more appropriate time.
To restart
Apache manually:
- Open your command line interface.
- Type /etc/rc.d/init.d/httpd restart and press the
Return.
- You will need the root password to use the restart command.