Imported cPanel Domains DNS not correct

I recently imported a cPanel backup into Virtualmin and for some reason my DNS for each site was not setup correctly. I am not sure why.

The import also brought in some stuff like .cPanel which I want to know if it can be removed.

Status: 
Closed (fixed)

Comments

The import would copy all the home directory data over -- and some files/directories may not be needed anymore, such as .cPanel. You should be able to delete it -- though if you want to be certain, you could always start by just renaming it.

As far as your DNS goes -- what isn't working correctly? Are you receiving any errors?

I had mutiple sub-domains in cPanel that no longer work. It's like there DNS settings are not correct somehow.

A little more information. I use slicehost VPS and they have there own DNS control panel to setup everything. I had to setup my domains in there to get them to work. I have only done two (dharmadesigngroup.com and explorewebhosting.com) in there and would rather not have to input the rest of them manually like that. Especially when it seems like Virtualmin has created its own dns record.

Ah, it sounds like the issue here is that the domains in question are using SliceHost as their DNS servers, rather than your Virtualmin server.

That will work, but as you're seeing, it means you'd need to manually input all your domains and the related IP addresses.

If you have the DNS feature enabled on your Virtualmin server, you could set it up to act as the primary DNS server for the various domains that you host on it.

To do that, you'd need to go to your domain name registrar, and register (at least) two nameserver domain names to point to the IP address of your server. For example, if your server's hostname is example.com, you might setup ns1.example.com and ns2.example.com as it's nameservers.

Then, in Virtualmin, go into Services -> DNS Domain for the "example.com" domain, and make sure you have DNS entries setup for ns1.example.com and ns2.example.com.

Once you've done that, you can change the nameservers of your domains to use your server as the DNS server, rather than that of SliceHost.

Then, in Virtualmin, go into Services -> DNS Domain for the "example.com" domain, and make sure you have DNS entries setup for ns1.example.com and ns2.example.com.

This is the same information provided in the Virtualmin Documentation at http://www.virtualmin.com/node/111 but it is inaccurate.

The Services area doesn't have the "DNS Domain" option in it.

It looks to me that Server Configuration > DNS Options or Server Configuration > DNS Records, is where the DNS configuration is now done.

In addition, the error below may be pertinent to this topic.

"Failed to save enabled features : Virtualmin is configured to setup DNS zones, but this system is not setup to use itself as a DNS server. Either add 127.0.0.1 to the list of DNS servers, or turn off the BIND feature on the module config page."

I get this error every time I go to System Settings > Features and Plugins and try to enable Subversion repositories.

Howdy! Well, the Support Request here is a year old or so -- Server Configuration -> DNS Domain actually was the correct way of doing all this last year. A few months ago, the UI was updated, and you're correct that it's now called "DNS Records" rather than "DNS Domain".

Thanks for the heads up on the document you linked to -- it wasn't complete, and wasn't intended to be published. I think it managed to find it's way into the Virtualmin search results anyhow though.

As far as the error you're receiving when modifying features in the "Features and Plugins" area -- there's information on that particular issue here that should get you straightened up:

http://www.virtualmin.com/documentation/dns/faq

Yes... I realize this post was over a year old, but it did show up in the search results when I was searching for a similar issue.

I didn't mean to wake the dead, but the documentation at: http://www.virtualmin.com/node/111 was linked to directly from Home » Documentation » Installation Guides » Automated Virtualmin Installation and it was what was included in the resolution for this thread.

The "Received Virtualmin error that 127.0.0.1 isn't listed in /etc/resolv.conf" part of http://www.virtualmin.com/documentation/dns/faq does not apply to my situation. My server's IP Address is STATIC and it doesn't restart for months at a time.

Thanks for the information regarding the documentation -- since it was out of date and never completed, I've removed it altogether, which should prevent any further confusion.

As far as the error you're getting -- that would only occur if "127.0.0.1" isn't listed as a nameserver on your server anymore... but since Virtualmin adds that in there during installation, that means something removed it.

If it's possible that were just accidentally removed at some point, you can simply re-add it by editing /etc/resolv.conf, and making sure you have a line like this:

nameserver 127.0.0.1

If it continues to happen, that likely means one of two things:

  1. You're using a VPS, and the VPS provider is overwriting your resolv.conf file. However, that typically only occurs during reboots.

  2. Although you have a static IP address from your ISP, it's possible to obtain that static IP address using the DHCP protocol. If that's the case on your server, that could be inadvertently overwriting the entries in the resolv.conf file.

I'm not sure what would be editing the /etc/resolv.conf file.

My resolve.conf file was essentially blank. It contained only...

### BEGIN INFO
#
# Modified_by:  NetworkManager
# Process:      /usr/bin/NetworkManager
# Process_id:   3206
#
### END INFO

So, I added...

### BEGIN INFO
#
# Modified_by:  NetworkManager
# Process:      /usr/bin/NetworkManager
# Process_id:   3206
#
### END INFO

domain sapphiresolutionsltd.com
search sapphiresolutionsltd.com
nameserver 127.0.0.1

to the bottom of the file.

No more error adding plugins from System Settings > Features and Plugins, so one problem down, but still a few things I need to look into.

You're using a VPS, and the VPS provider is overwriting your resolv.conf file. However, that typically only occurs during reboots.

I'm not using a VPS. Virtualmin is installed on a physical server, unless Cloudmin is causing the problem.

Although you have a static IP address from your ISP, it's possible to obtain that static IP address using the DHCP protocol. If that's the case on your server, that could be inadvertently overwriting the entries in the resolv.conf file.

The whole IP Configuration on this server is statically assigned. My ISP uplink doesn't even have DHCP turned on.

Yeah, it doesn't sound like the two causes I mentioned apply to you.

My suggestion would be to wait and see if your changes stick this time around. If they don't -- we may need to dig into what's causing that.

If it happens again, open up a new support request, and we can work out the details of what's going on there with your resolv.conf file.

I also tried to install "Analytics Tracking" via System Settings > Features and Plugins. I was given an error that Apache's mod_perl version 2 was not installed. So, I installed it.

apt-get install libapache2-mod-perl

I then restarted Apache.

/etc/init.d/apache2 restart

and was presented with...

Restarting web server: apache2apache2: Could not reliably determine the server's fully qualified domain name, using hx200.sapphiresolutionsltd.com for ServerName
[Thu Jul 21 09:40:00 2011] [warn] NameVirtualHost 173.165.231.53:80 has no VirtualHosts
[Thu Jul 21 09:40:00 2011] [warn] NameVirtualHost 173.165.231.53:443 has no VirtualHosts
... waiting apache2: Could not reliably determine the server's fully qualified domain name, using hx200.sapphiresolutionsltd.com for ServerName
[Thu Jul 21 09:40:01 2011] [warn] NameVirtualHost 173.165.231.53:80 has no VirtualHosts
[Thu Jul 21 09:40:01 2011] [warn] NameVirtualHost 173.165.231.53:443 has no VirtualHosts

...which is odd, because 173.165.231.53 is not the IP Address of this system, nor is it the IP Address assigned to either name server.

When anyone installs Debian GNU/Linux, they are required to supply a fully qualified domain name. The domain name I used was hx200.sapphiresolutionsltd.com

I was able to follow the "How do I setup nameservers for my server?" section of http://www.virtualmin.com/documentation/dns/faq and correctly register ns1 and ns2 nameservers with GoDaddy and on the Virtualmin server.

My nameservers are configured such that ns1.sapphiresolutionsltd.com is pointed to 173.165.231.49 and ns2.sapphiresolutionsltd.com is pointed to 173.165.231.50

QUESTION: If this server is using 173.165.231.50 as its IP Address, what good is a second nameserver, pointing at the 173.165.231.49 IP Address, if there isn't a server of any kind there?

The actual IP Address of this server is 173.165.231.50 not .53

I went to Webmin > Servers > Apache Webserver > Global configuration > Edit Config Files > Apache2.conf and found...

# Include the virtual host configurations:
Include /etc/apache2/sites-enabled/
NameVirtualHost 173.165.231.53:80
NameVirtualHost 173.165.231.53:443
NameVirtualHost 173.165.231.50:80

...which was part of the problem. When I used the Virtualmin > Server Configuration > Change IP Address function, it must not have removed the old IP Address and SSL is not enabled on this system, yet.

I changed this to...

# Include the virtual host configurations:
Include /etc/apache2/sites-enabled/
NameVirtualHost 173.165.231.50:80

... because the .53 IP Address doesn't exist and I'm not currently running a site with SSL. Then I restarted Apache.

This time, I only was presented with...

Restarting web server: apache2apache2: Could not reliably determine the server's fully qualified domain name, using hx200.sapphiresolutionsltd.com for ServerName
... waiting .apache2: Could not reliably determine the server's fully qualified domain name, using hx200.sapphiresolutionsltd.com for ServerName
.

QUESTION: What am I missing here with the fully qualified domain name?

We'd be happy to help!

We're adding a few too many new issues to this old support request though... could you open up a new support request, and put this exact question there?

Then, we'll get to the bottom of what's going on. Thanks!

Ah, yes...

Maybe we should break off my posts starting with number 5, to its own issue. Is that something you can do?

No, unfortunately, those posts are stuck here :-)

That's okay though -- if we start fresh with this particular issue, that'll be great!

Great, I'm glad you got that fixed! If you have any other questions, feel free to let us know.

Automatically closed -- issue fixed for 2 weeks with no activity.