Apache is the main service serving web requests on a typical WHM server. Simply put, whenever someone visits your website through a browser, Apache will receive the request, locate your website inside its configuration file and it will show the content located in the root directory of the accessed website. Usually, each site has an index page that will show the homepage of your website to the visitors accessing it.
The Apache web service has a lot of configurations related to it and through the “Apache Configuration” feature in the WHM control panel, you are able to control the web service’s behavior based on your preference.
We will be covering all of the available settings inside this functionality, so please, tuck in comfortably as we are going to be as thorough as possible in helping you understand how to use the “Apache Configuration” feature and what the various sections under it can be used for. Let’s get started!
As with all of the features inside the WHM control panel, you need to log into the WHM service for your VPS or Dedicated Server. If you are not sure how to do that, please check our How to access the WHM service tutorial. After you have logged in, please use the search bar on the left side of the page and type “Apache Configuration”.
When the functionality shows up below the search bar, please click on it so you can be sent to the “Apache Configuration” page.
When you land on the “Apache Configuration” page, you will notice a couple of links, each representing a specific setting of the Apache web service you are able to modify. We will go through all of them, in the same manner, they are displayed on the page.
The first one is the “Global Configuration” section. It will allow you to add or remove common directives inside the httpd.conf (Apache configuration) file. Many of these directives require that you format your entry in a specific way. In order to view a directive, please refer to its documentation on the official Apache website.
In order to access the “Global Configuration” settings of the Apache web service, please press the “Global Configuration” link, located at the top of the screen.
When the “Global Configuration” link is pressed, you will be redirected to the new page, containing the settings related to the directives inside the httpd.conf configuration file of the Apache service.
On the “Global Configuration” page, you will find a table section containing a lot of rows. Each one of those represents a specific setting of the Apache web service. On the top right of this section, you will locate a “Find” field where you can type in a particular setting you are interested in. This will display it at the top of the section for your convenience.
Let’s go over all of the directives you are able to alter in the table section.
When you alter the directives to your liking, please press the “Save” button located on the bottom of the page.
This will redirect you to a summary page, which will show all the directive values you have set. Please go through them one last time before finalizing the process in case you have made a mistake.
After you review the new values, to finish the process and apply the new settings, please press the “Rebuild Configuration and Restart Apache” button located on the bottom of the summary page.
The last page will be a changelog, showing you that the Apache configuration file has been rebuilt and that the Apache service has been restarted.
To access this section, please press the “DirectoryIndex Priority” link located underneath the “Global Configuration” link on the “Apache Configuration” page.
When you land on the “DirectoryIndex Priority” section, you will see a large content box, populated with a lot of files with different extensions (PHP, CGI, HTML, js, etc.).
The files inside this content box will represent the priority in which the Apache web service will process the files in the website’s root directory. If you keep our default configuration, if all the files that populate the content box are within the root directory of a website and if this site is accessed by a visitor in a web browser, Apache will show the “index.php” file as it is currently on top of the content box. Let’s go over all the buttons, located on the right side of the content box:
Once you have made the changes on the “DirectoryIndex Priority” page, please press the “Save” button located on the bottom of the content box to apply the new index priority.
This will send you to a page, containing the new order of the index priority.
If you are happy with the new index priority, please press the “Rebuild Configuration and Restart Apache” button located on the same page.
The last page will be a changelog, showing you that the Apache configuration file has been rebuilt and that the Apache service has been restarted.
To access this section, please press the “Include Editor” link located underneath the “DirectoryIndex Priority” link on the “Apache Configuration” page.
When you land on the “Include Editor” page, you will be able to add additional configuration files to your main Apache httpd.conf, using the Include directive.
Please note that any change you perform on the httpd.conf file will affect the default Apache configuration which may alter the way Apache behaves.
You have the following options on the “Include Editor” page:
Pre Main Include
In order to add the “Includes” directive on top of the Apache configuration file before the system configures the VirtualHosts, please use the dropdown menu located under the “I wish to edit the Pre Main configuration include files for:” heading. Please select the “All Version” option so you can add this directive to all future Apache versions. You should use this option to prevent overwriting any part of the httpd.conf.
This will open a content box, where you can type in the changes or options you want to include.
After you are done, please press the “Update” button located underneath the content box.
This will show you which apache configuration files have been altered and will also give you access to the “Restart Apache” button located on the bottom of the page which needs to be pressed so the process is finalized and Apache accepts the new “Include” directive values.
Pre VirtualHost Include
To insert the “Includes” directive right before the VirtualHosts line, please use the dropdown menu located under the “I wish to edit the Pre VirtualHost configuration include file for:” heading. Please select the “All Version” option so you can add this directive to all future Apache versions. You should use this option to only modify the part of the httpd.conf before the system configures the VirtualHosts.
This will open a content box, where you can type in the changes or options you want to include.
After you are done, please press the “Update” button located underneath the content box.
This will show you which apache configuration files have been altered and will also give you access to the “Restart Apache” button located on the bottom of the page which needs to be pressed so the process is finalized and Apache accepts the new “Include” directive values.
Post VirtualHost Include
To insert the “Includes” directive after the VirtualHosts entry, please use the dropdown menu located under the “I wish to edit the Post VirtualHost configuration include file for:” heading. Please select the “All Version” option so you can add this directive to all future Apache versions. Using this option will permanently modify a part of the httpd.conf.
This will open a content box, where you can type in the changes or options you want to include.
After you are done, please press the “Update” button located underneath the content box.
This will show you which apache configuration files have been altered and will also give you access to the “Restart Apache” button located on the bottom of the page which needs to be pressed so the process is finalized and Apache accepts the new “Include” directive values.
Typically, the WHM control panel will configure Apache to respond to any requests on any of the IP addresses added on your server. The “Reserved IP Address Editor” section will allow you to configure Apache to ignore certain IP addresses. Furthermore, the system will not assign these IP addresses to new accounts.
To access this section, please press the “Reserved IP Address Editor” link located underneath the “Include Editor” link on the “Apache Configuration” page.
When you land on the “Reserved IP Address Editor” page, you will see a table section containing all of the IP addresses on the server.
To add an IP address, or remove an IP address from the reserved IP address list, please select or respectively deselect it using the checkbox under the “Status” column.
When you have selected an IP address, please press the “Save” button located below the table section.
This will redirect you to a page informing you about the IP you selected and will also contain a button “Rebuild Configuration and Restart Apache” which needs to be pressed in order to finalize the process.
The last page inside the “Reserved IP Address Editor” section will show a changelog, letting you know that the Apache configuration file has been rebuilt and that the Apache service has been restarted.
Using the settings contained with the “Memory Usage Restrictions” section, you will be able to calculate and set a new memory limit for Apache processes. This limit only applies to an individual Apache process.
To access this section, please press the “Memory Usage Restrictions” link located underneath the “Reserved IP Address Editor” link on the “Apache Configuration” page.
When you land on the “Memory Usage Restrictions” page you will find a description of the section and beneath this description, you will see a radio button that will let you either disable or enable the memory restriction.
If you select “Enable” the greyed-out text field below the radio button will become active and you can type in the limitation value (this must be an integer value greater than 1). The system recommends using 344MB so if you are planning on enabling this, please this value
When you are done typing in the limiting value, please press the “Save” button located beneath the text field.
This will redirect you to a page, which will let you know that the memory limit has been set and that the Apache web service has been restarted.
The “Log Rotation” section will allow you to select the logs you want the cpanellogd daemon to compress and store as an archive. At the end of the month, the cpanellogd daemon will compress the logs you selected in this section into a single file for each type. The system will store the compressed files in the /home/username/logs directory, where the username represents the name of the cPanel account.
To access this section, please press the “Log Rotation” link located underneath the “Memory Usage Restrictions” link on the “Apache Configuration” page.
When you land on the “Log Rotation” page you will find a description of the section and beneath this description, you will locate checkboxes that you can include inside the cpanellogd daemon rotation.
When you have chosen the logs you want to include in the rotation, please press the “Save” button located underneath the checkbox section.
The last screen in the “Log Rotation” section will show which logs are currently in the rotation and which ones are not.
Using the option inside the “Piped Log Configuration” section will enable you to use a single file for all virtual host access and bandwidth logs. When the option is selected the system will relay the combined logs to an assistant application (the splitlogs binary), which will split the logs into individual domain logs. Furthermore, enabling this option will reduce the number of log files that Apache needs to manage and will reduce the used number of resources used during the process.
To access this section, please press the “Piped Log Configuration” link located underneath the “Log Rotation” link on the “Apache Configuration” page.
When you land on the “Piped Log Configuration” page you will find a description of the section and underneath, you will locate a checkbox that lets you enable the “Piped Access Logs” option.
To save this setting, please press the “Save” button located under the “Enable Piped Apache Logs” checkbox.
When the “Save” button is pressed, you will see a message appearing above the “Enable Piped Apache Logs” notifying you that apache is queued for a restart and the cpnaellogd daemon has been restarted.
With this last section, we will end our tutorial regarding the “Apache Configuration” feature in the WHM control panel. It is a lot of information to go through but we are certain that we covered everything important you need to know and if you acquire the information provided in this guide, you will be able to manipulate the Apache service to your liking with ease. As always, our technical support is 24/7 available at your disposal and will be happy to assist you, should you face any difficulties with this functionality. They are reachable through the ticketing system in your Client Area.
Sebahat is a young and bright woman who has become an invaluable part of our team. She started as a Customer Care Representative, mastering that role and, along the way, growing into a tech-savvy individual who is well acquainted with every support layer of the company. Driven by her aim to improve our customers’ experience constantly, she is committed to enhancing the extraordinary support we deliver.