Any precautions Rebuilding EasyApache Configuration?

Sep 6, 2018
13
2
3
England
cPanel Access Level
Root Administrator
I'm new to WHM and CPanel and would like some feedback on rebuilding and restarting Apache.

I have a server running several websites and would like to turn off directory listings globally.

Usually I'd edit the httpd.conf and restart Apache. Looking at the Apache conf and reading the WHM/CPanel documentation the httpd.conf is automatically generated, and the most sensible way to do this would be via the WHM portal and have it rebuild the conf files and restart Apache for me.

The options I'm looking at are under Home » Service Configuration » Apache Configuration »Global Configuration and the UI reports "For your changes to take effect, the Apache configuration must be rebuilt and Apache restarted."

Are there any known gotchas with the process? should I be concerned Apache may not restart or that direct modifications to httpd.conf (unknown to me) could be lost or messed up?

I've backed up /usr/local/apache/httpd.conf. Presumably I could replace the newly generated httpd.conf with the backup and restart Apache from the command line if things go awry?

I guess I'm asking what backups need to be taken and how do I recover if it all goes wrong?
 
Last edited by a moderator:
  • Like
Reactions: cPanelLauren

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
Are there any known gotchas with the process? should I be concerned Apache may not restart or that direct modifications to httpd.conf (unknown to me) could be lost or messed up?
Nope, you shouldn't be - as long as you're making the changes in WHM through the Apache Configuration you should be fine.

I've backed up /usr/local/apache/httpd.conf. Presumably I could replace the newly generated httpd.conf with the backup and restart Apache from the command line if things go awry?
We create a backup when the process starts you shouldn't need to worry about this but I commend you for this practice, I wish everyone would follow suit! If you want to be cautious a backup of the httpd.conf is all that is necessary.


Thanks!