Web server from scratch, running into problems in WHM

manfredmanley

Member
Apr 16, 2014
6
0
1
cPanel Access Level
Root Administrator
Hello everyone- first post here.

A little background on the project I'm working on:
I've been put in charge to set up a small data center (2 42u cabinets) at our office to handle our in-house email delivery system. I have a little experience setting this up but never on this scale. We have a remote server in another data center which hosts our domain domain.com and uses the Nameservers at this location.

I recently racked up a freshly installed a CentOS 6.5 server and set up WHM/cPanel. I set the server IP to 40.138.xx.xx with the hostname of bennet1.domain.com

In the zone file for domain.com, I added an A record to point to bennet.domain.com to resolve to this new server's IP address 40.138.xx.xx

So far so good. ping bennet.domain.com gives me correct IP.

Here's where I'm stuck:
I created an account in WHM with the domain "bennet.domain.com" and set it to use the main shared IP 40.138.xx.xx.
Our developer was able to access the account temporarily through 40.138.xx.xx:2083 and add some files.

I think I am having some DNS issues however. Now I go to bennet.domain.com The address bar changes to 40.138.xx.xx/admin/index.php, which is in the directory for the user but won't find any files. Also, if I just try to go to 40.138.xx.xx, I am directed to /http://40.138.xx.xx/cgi-sys/defaultwebpage.cgi

What I need it to go to is bennet.domain.com/admin/index.php


Any ideas?
I hope I gave enough details for some advice on what could be the issue here. Any feedback is appreciated.

Thanks

To add to my original post a little:

An basic example of what I'm trying to do is set up a test server, only at a different locations, and I think the DNS is confusing me. Do I need to configure a DNS through WHM if the only account is a subdomain of our main domain on a different server using different DNS?

Something is misconfigured somewhere and I've literally spent all day trying to figure this out, so anyone who can, please help me sleep easy tonight.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,254
463
I think I am having some DNS issues however. Now I go to bennet.domain.com The address bar changes to 40.138.xx.xx/admin/index.php, which is in the directory for the user but won't find any files. Also, if I just try to go to 40.138.xx.xx, I am directed to /http://40.138.xx.xx/cgi-sys/defaultwebpage.cgi
This actually seems like an issue with the script you are using. Is there a configuration page for this script where you set the "Site URL" or similar? If so, make sure it's set to the actual domain name and not the IP address.

Thank you.
 

manfredmanley

Member
Apr 16, 2014
6
0
1
cPanel Access Level
Root Administrator
You were correct, there was a redirect to the IP.

I changed the redirect replacing the IP address to http://bennet.domain.com/~username

Now, when I go to http://bennet.domain.com, I am taken to http://bennet.domain.com/cgi-sys/defaultwebpage.cgi

If I try http://bennet.domain.com/~username, the redirect works correctly, but the username is now in the address bar. The redirect doesn't work without the /~username at the end.


Thank you