February
22
apache_conf_distiller User data set has no ‘main_domain’ key.
After a server was hacked recently, the attackers replaced all files named index / default / main with their typical 0wned-by message and javascript. Of the “main” files that were affected, the /var/cpanel/userdata/USER/main files were also overwritten. These files contain important cpanel domain information which are required to build a new httpd.conf using the apache_conf_distiller. The following steps should regenerate a working apache userdata in order to fix subdomains. Thanks to Josh for finding userdata_update!
/etc/init.d/httpd stop mv /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf-notworking cp -a OLDHTTPD.CONF /usr/local/apache/conf/ mv /var/cpanel/userdata /var/cpanel/userdata-BAK /usr/local/cpanel/bin/userdata_update cp -a /var/cpanel/userdata /usr/local/apache/conf /etc/init.d/httpd start
Run the /usr/local/cpanel/bin/apache_conf_distiller –update to ensure the main_domain key errors are gone.