MilesWeb Hosting Forum

Web Hosting Technical Support => How To's => Topic started by: Rahul Sambre on July 09, 2016, 07:38:08 PM

Title: How to update apache configuration file on cpanel.
Post by: Rahul Sambre on July 09, 2016, 07:38:08 PM

If you are making any changes directly in the apache configuration file on cPanel servers then please donít forget to run the apache distiller to update the template, userdata and apache configuration data files. Otherwise, the changes will get revert back in next apache update.
For example, if you are editing virtualhost entry of any domain then use
the below command to update the userdata.

/usr/local/cpanel/bin/apache_conf_distiller --update

This will prevent cPanel and Apache from removing any changes you made whenever Apache gets restart.


When you need to edit the httpd.conf file or settings for a specific cPanel user you should do so from the below command.

/var/cpanel/userdata/USERNAME folder

After you update any of those files you need to tell cPanel to rebuild the apache configuration file, the easiest way to do that is to run below command.


That's it.  :)