-1

I created a VPS running WHM/CPanel on CentOS 6.3 with latest version of WHM and for example my domain names are domain1.com and domain1.co.uk, with ENOM I registered two nameservers for domain1.com; these being ns1 and ns2 = both domains nameservers are set to the registered NS's and they resolve fine.

We created an account in WHM for the .CO.UK domain and this works perfectly, the setup for WHM is setup to point to ns1 and ns2 and the hostname of WHM is ns1.domain.com.

The problem I have is that when navigating to the .COM domain I receive the following error: Executing in an invalid environment for the supplied user. Essentially I want both domains to be exactly the same - I considered logging into domain1.co.uk cPanel and adding .COM as an parked domain but believe this would cause issues if Wordpress was installed on the .co.uk domain and so I didn't do that, I didn't implement addon domains because I was worried it'd cause DNS issues.

I SSH'd into my VPS and tried placing a htaccess file in public_html for the root domain hoping that this would work - however it does not appear to make any difference and I am 100% confident the htaccess file is correct - a 301 from .com to .co.uk.

Does anybody have any suggestions in order to ensure both domains work correctly - I tried adding an account in WHM for .com but of cause it wouldn't let me because the DNS zone already exists as ns1.domain1.com is the DNS controller for everything.

I meant to mention also, if I navigate to the IP address of my VPS I get a web page returned an the URL will be http://myipaddress/cgi-sys/defaultwebpage.cgi but browsing to domain1.com it again tries to redirect to /cgi-sys/defaultwebpage.cgi but instead of returning the same page it returns the error. Browsing to ns1.domain1.com works however I can't test the HTACCESS until Monday.

Thinking about it - should my WHM hostname be domain1.com and not ns1.domain1.com?

Thanks very much.

1 Answers1

0

Solved - I had to create an account for the .COM domain in WHM, I choose to overwrite the DNS server settings on the setup page and this worked, I then went into CPanel for that account and setup redirection.

The hostname for WHM remained the same ns1.mydomain.com as it's the DNS Controller for the entire domain.