Missing httpd.conf in WHM / cPanel

Came across an error after mistakenly clicking a link in my hosting control panel.

CODE:
  1. Unable to locate httpd.conf at /usr/local/cpanel/Cpanel/ConfigFiles.pm line 27.
  2. Cpanel::ConfigFiles::find_httpconf(undef) called at /usr/local/cpanel/Cpanel/ApacheConf.pm line 206
  3. Cpanel::ApacheConf::loadhttpdconf() called at whostmgr/bin/whostmgr4 line 197
  4. main::listaccts() called at whostmgr/bin/whostmgr4 line 157

At the time, WHM was working but none of the sites on the server would load. Trying to restart httpd manually from PuTTY resulted in an error that httpd.conf couldn't be found.

Fortunately, there was an easy fix.

CODE:
  1. /scripts/rebuildhttpdconf

It's a script included with WHM that rebuilds the httpd.conf file. Ran it, waited a couple of minutes while the server churned, started Apache, and everything was back to normal.

This entry was posted in Internet and tagged , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>