How to Rebuild Apache Config (httpd.conf)

Run this command and cPanel will rebuild the Apache httpd.conf file:

/scripts/rebuildhttpdconf

This rebuilds the httpd.conf file from the cPanel templates at /var/cpanel/templates/.

Restart Apache
Your web server will not be affected until you restart Apache, which you can do safely either inside WHM (Web Host Manager):

Restart Services -> HTTP Server (Apache) -> Restart

Or via SSH command:

/scripts/restartsrv_apache


If the above commands don't work, run it (by running the command will take 2-5 minutes):

yum reinstall ea-apache24-config-runtime -y
  • apache, httpd, centos, cpanel
  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

How to fix defaultwebpage.cgi on a webserver

Running the following commands solves the above problem:   /scripts/updateuserdomains...

How to fix IP Missing issue on cPanel/WHM

We are here to help you with solving the problem of Missing IP Server in list accounts. The...

Install Let's Encrypt SSL in cPanel/WHM

Let's Encrypt, a valid, open-source license that offers free SSL for your domains. The Let's...

Fix Email Issue on a server using the MSFE

To solve the problem of not sending/receiving email on a server using the MSFE / Mailscanner...

Domain names are not showing in WHM

We were unable to see any domains listed under WHM -> List Accounts. However, we can see the...