Virtualmin, Multiple Domains, 1 IP Address, GoogleApps. Bind?

Hello. I have been trying to get this working for about a week now (@7 hour days) and am still no further ahead. I have searched and read dozens of articles here, and elsewhere, and can’t seem to get my head around what I am doing wrong.

Thankfully I have a backup of a freshly installed VirtualMin GPL on CentOS 6 64bit that I made after re-installing for the 8th time.

So here is the scenario :

I have a VPS with CentOS 6.3 64bit and the latest VirtualMin GPL. The VPS Host allocated 1 IP address with my account and I used a fluff hostname that doesn’t resolve/exist anywhere.

I would like to use this VPS to host and run multiple domains (5 approximately, all low or no activity). They are all top level domains, no subdomains. They are all going to be used/administered/maintained by me but I would like them to all have their own site folder under /home (not as /home/me/domains/etc…). So I am trying to create all 5 as top level servers.

I use FreeDNS for all my domains and have added them all there in the form of

{DOMAIN}        A        [IP provided by VPS host]
ftp.{DOMAIN}  A	        [same IP]
www.{DOMAIN}  A	[same IP]

{DOMAIN2}        A      [same IP]
ftp.{DOMAIN2}  A       [same IP]
www.{DOMAIN2}  A	[same IP]

{DOMAIN3}        A      [same IP]
ftp.{DOMAIN3}  A       [same IP]
www.{DOMAIN3}  A	[same IP]

etc... (with a bunch of mx records to point to googleapps and some redirects to mail.{domain} going to googlemail as well)

This is where I get confused. Everything is pointing to that one IP. Do I need BIND at all then at this point? If not, how do I configure a server template to host these virtual hosts? Should I use the “Shared IP” option or should I be creating Virtual IP Ranges on the NiC? (I have tried both and haven’t seemed to be able to get it working either way)

Do I need to make 1 of the 5 domains a default in case someone manually types in the 1 IP address? Or should I make a static index.html page somewhere for that?

I don’t need/want the ability to use mail. I use GoogleApps for that when I need it. I have left postfix running for system generated emails, but I believe I can turn off dovecot, sendmail, clamav, spamassassin. Is this correct?

I also don’t plan on using FTP anonymously (again only me uploading files). Can I turn off ProFTPd? Do I need to use SCP if I turn off ProFTPd?

I apologize if my “search-fu” isn’t good enough to turn up the answers if they are already here, but I have indeed spent a lot of time trying to sort it out on my own.

Any help / direction?

Thanks in advance for any advice. Feel free to ask for any clarity if I muddied anything.

Since you use an external nameserver, you don’t need BIND on your server. You can simply keep the feature “DNS domain” turned off for the 5 domains, that will suffice.

About “default domain”: That’s up to you. If you wish one of the 5 domains to be fetched when a user enters the IP of your server or another hostname unknown to Apache, set that as default. If you want a different “nothing here” page, create another dummy domain and set that as default.

If you don’t need mail, keep the “Mail for domain” feature turned off. You could also stop the Postfix and Dovecot service, but don’t uninstall their packages. That would break Virtualmin’s dependencies.

You can turn off ProFTPD (as in stop its service) if you don’t need FTP at all, whether anonymous or with login. IF you turn it off, and you still wish to transfer files, well, SCP (SFTP) is one option then.

Thanks for the answers Locutus. I appreciate you taking the time. But one of the bigger questions you might have missed in my long winded post still nags at me.


Is the way I am pointing everything on my external DNS server to that one IP address on my VPS Host the correct way to go? I have disabled BIND completely on my VPS host server. If so, do I choose “Shared IP” when creating the virtual servers or do I need to create a block of virtual IPs to use? Or does both methods work?


I didn’t see the “default domain” option previously when I was having colossal failbures, but I wasn’t really looking for it either, as nothing was working :slight_smile: Since I just re-installed my fresh backup again (150th time this week hah) I don’t have any virtual servers added yet. I will add a couple and take a look for that default domain.

Thanks again.

Oh sorry, I indeed overlooked that one point.

Your external nameserver setup looks okay, from what I can tell. :slight_smile: As long as the NS entries for your domains at the NIC are pointing to that nameserver, and it has A and MX etc. entries for all the sub-hostnames you want, you’re fine. You’ll need MX entries though if you wish to receive mail for your domains at ANY server, be it Google or yours.

A good site to check for possible DNS errors is

You only need one IP on the VPS, and choosing “Shared IP” is the right way to go. No need to create virtual IPs (which you could only do if you actually HAD multiple external IPs, which you probably don’t :slight_smile: ). All domains share the same IP, Apache listens on that and decides which site to serve by looking at the “Host” header.

I really appreciate the help and I will give it a go tonight and see if I finally get somewhere.

Your external nameserver setup looks okay, from what I can tell. :slight_smile: As long as the NS entries for your domains at the NIC…

? Do you mean I have to set up Nameserver Entries on the network interface card on my VPS Host even though Bind is disabled? Seems…odd. Maybe I am reading that line wrong…?

Thanks a bunch and I will report back with result.


Sorry, a little acronym confusion there. NIC can mean “Network Interface Card”, indeed, but in this case, it was supposed to mean “Network Information Center”, i.e. the institution that manages domain names for the respective top-level and their NS entries at the TLD’s root nameservers.

So to clarify: At the Information Center, the NS records for the domain in question must be configured to point to the nameserver that holds the records you listed in your initial post. I’m assuming that is all done and okay, just making sure you know that this step is vital. and “dig +trace” can help should you have any DNS problems.

Finally. A week of learning. That’s how I will remember the last week of hair-pulling angry-making.

Thanks Locutus. Your help was indispensable. It is all functioning properly now. (One more reinstall to clean out my latest tests and then I am good to go)

Too bad this wasn’t like StackOverflow so I could throw you some karma/love/points/etc…