Can't add multiple domains because of existing virtualhost in httpd.conf

odmin

Registered
Jun 29, 2011
1
0
51
Hi!
I already add domain for example domain.info and it's working well. When I try to add domain.com, domain.biz I have error: Error from domain wrapper: domain.com is controlled by another user.

The problem is I have in httpd.conf next setup for my virtualhost:

<VirtualHost xx.xx.xx.xx:80>
ServerName domain.user976.localhost
ServerAlias Domain.com | Register your domain name today! www.domain.user976.localhost domain.info
DocumentRoot /home/user976/public_html/domain.info
ServerAdmin [email protected]ost
UseCanonicalName Off
CustomLog /usr/local/apache/domlogs/domain.user976.localhost combined
CustomLog /usr/local/apache/domlogs/domain.user976.localhost-bytes_log "%{%s}t %I .\n%{%s}t %O ."
## User user976 # Needed for Cpanel::ApacheConf
<IfModule mod_suphp.c>
suPHP_UserGroup user976 user976
</IfModule>
<IfModule !mod_disable_suexec.c>
SuexecUserGroup user976 user976
</IfModule>
ScriptAlias /cgi-bin/ /home/user976/public_html/domain.info/cgi-bin/


# To customize this VirtualHost use an include file at the following location
# Include "/usr/local/apache/conf/userdata/std/2/user976/domain.user976.localhost/*.conf"
</VirtualHost>

Looks like cpanel trying to add new virtualhost domain.com with ServerName domain.user976.localhost what already exists. How can I fix this?
 

ServerMascot

Member
Jan 17, 2011
13
1
53
Hello

As per the virtual host entry which you have provided here it seems that the domain.com is already added as park domain on top of domain.info. In case if you have not added the domain domain.com as a park domain on top of domain.info then please remove the entry domain.com from the ServerAlias line and try again . If the issue still persists then take the backup of the directory "/var/cpanel/userdata/cp_username" and edit the file "main" and "main.cache" and delete the entry for the domain.com from the those files. Once you have removed such entry then rebuild the user data cache by running the cPanel script "/scripts/updateuserdatacache" and try adding the domain once again.

Hope that helps.