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

  1. 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.
    • PICK Remember: It may be important to specify a file type here, for example, .html.
  2. Click OK.
  3. Click Save.

note 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

  1. Select the desired filenames to be removed from the list.
  2. Click Remove.
  3. Click Save.

note 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

  1. Select the filename you would like to move up or down.
  2. Click Move Up or Move Down to change the filename’s order.
    • PICK 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.
  3. Click Save.

note 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:

  1. Open your command line interface.
  2. Type /etc/rc.d/init.d/httpd restart and press the Return.
    • You will need the root password to use the restart command.

Topic revision: r7 - 25 Jan 2013 - 22:07:04 - Main.LaurenceSimon