Problem with main domain after transfer

shaibn

Member
Dec 29, 2009
12
0
51
Hi,

After a successful restore of a cPanel backup, the main domain of the account does not have a virtualhost in the httpd.conf file and thus, shows in WHM that it can't identify the IP address nor can I assign it an IP.

I tried the rebuild httpd conf but that didn't bring it back.
I also can't find the zone for it...

Other then terminating the account and re-creating it manually, what else can I do?

Thanks in advance!
 

shaibn

Member
Dec 29, 2009
12
0
51
Should I edit /usr/local/apache/conf/httpd.conf or /etc/httpd/conf/httpd.conf ?

Or maybe one of the includes?
 

madaboutlinux

Well-Known Member
Jan 24, 2005
1,051
2
168
Earth
The file under /etc is hard linked to the one under /usr so both the files are same and you have to edit any one of it.

120722524 -rw------- 1 root root 20895 Dec 28 04:56 /etc/httpd/conf/httpd.conf
120722524 -rw------- 1 root root 20895 Dec 28 04:56 /usr/local/apache/conf/httpd.conf
 
Last edited:

shaibn

Member
Dec 29, 2009
12
0
51
After I edited httpd.conf, I did /scripts/rebuildhttpdconf and the virtual host I created was removed.

What am I doing wrong? You said it won't be removed next time...
 

madaboutlinux

Well-Known Member
Jan 24, 2005
1,051
2
168
Earth
Well, always backup the configuration file before you edit. Now, edit the file once again, add the VirtualHost entry and execute the following two commands:

/usr/local/cpanel/bin/apache_conf_distiller --update --main
/usr/local/cpanel/bin/build_apache_conf
then restart the httpd service. See if that makes a difference.
 

shaibn

Member
Dec 29, 2009
12
0
51
I've come to the conclusion, that my original restoration of this backup was not accurate. I will pursue this a different way. Thanks for the assist thus far though :)

Happy new year!