In this article, we will show you how to change the Apache DirectoryIndex Priority.

Let’s check it out!

The Apache DirectoryIndex priority can be changed using the following steps given below:

 To change the global Apache configuration for all users, you can log into WHM and Follow the steps as discussed below:

  1. After logging into WHM, you will enter the Home screen by default.
  2. On the left-hand side you will see a search bar, search for Service configuration. Under service configuration you will see Apache configuration, select it.
  3. After clicking Apache configuration you will find a few options on the right-hand side. Among them click DirectoryIndex priority.
  4. After clicking DirectoryIndex Priority, a new page will appear consisting of directory index filenames. You can select and hit the save button. As shown in the image given below:

    If the change has to only be for a specific folder or user, this requires an edit to the .htaccess file. For example, the following code in the .htaccess file would place index.html before index.php in priority:
    DirectoryIndex index.html index.php 

In this way, the change occurs in the Apache DirectoryIndex Priority. However, if you still face any difficulty in the procedure mentioned above, feel free to reach out to the bodHOST Team for proactive support 24×7.

Read more about How to Setup Apache Virtual Hosts in CentOS 7

Popular Posts You May Read

Explore more hosting insights, tips and industry updates.

PHP Script to Test MySQL Database Connectivity

A test for MySQL database connectivity is done using the PHP script mentioned below. It…

How-to-Set-Up-Two-Factor-Authentication-on-WordPress

How to Set Up Two-Factor Authentication on WordPress

Activating the Google Authenticator plugin on your WordPress website is required before installing the Google…

What Is VLAN – How Do I Create It?

What is a VLAN?VLAN stands for Virtual Local Area Network. Technically, VLAN or virtual LAN…