How to restart Apache to make httpd.conf changes permanent?
When cPanel is updated or Httpd service is restarted using WHM, the custom changes created within the Apache configuration file directly will not work as a result of cPanel looks the new values within the file /var/cpanel/conf/apache/local.
However, you’ll be able to still make the changes directly within the Apache configuration and run the subsequent distiller commands to save the changes. So as to make the changes permanent and ensure the changes aren’t getting overwritten on next cPanel update / WHM restart, execute the following commands:
# /usr/local/cpanel/bin/apache_conf_distiller –update –main
# /usr/local/cpanel/bin/build_apache_conf
# /scripts/restartsrv httpd