These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for How can I use a domain instead of the IP for Virtualmin? on the new forum.
Hi! How can I use a domain instead of the IP for Virtualmin? Like www.example.com:10000 Regards Anders
First you need to register the domain name "example.com"
Then, in virtualmin, set the hostname.fqdn of your server (can also be done from the command shell). Something like server1.example.com
where hostname = server1
fqdn = example.com
Just to reinforce hostname.fqdn = server1.example.com
There are two things that need editing for your server hostname... 1. hostname 2. hosts file
They have slightly different content...do some google searching on this (there are quite a lot of variations in standards for this, so be prepared for some confusion).
Personally, one good resource for help on this is https://www.digitalocean.com/community/tutorials/how-to-install-virtualm....
They have some great tutorials on this kind of thing. Ensure that you also read the comments below any tutorials as these ask questions and have resolutions to problems you will most likely encounter when trying to set this up.
Now go to back to your domain registrar>zone file records...
Add an "A" record with the IP address of your virtualmin server.
server1.example.com A <123.456.789.12>
This will link the domain name server1.example.com with your virtualmin web server.
Next, ensure that you have TCP port 10000 open on both your VPS network and virtualmin server (the virtualmin server should sort itself when you install virtualmin, however, whilst usually your VPS network provider has all ports open...custom ports such as port 10000 wont be. My assumption is that if you are already able to access your virtualmin server via https://:10000 you have already sorted ports.
Once the zone file records have propogated across the internet, you will then be able to reach your virtualmin server via https://server1.example.com:10000
To check your dns propogation...use mxtoolbox.com (dns lookup)
Note some ISP's take longer than others to update their own nameservers...so just because mxtoolbox says it has propogated, your ISP may not have. So you might still have to wait a couple of hours.
Finally, you do not need to use BIND on your system or setup your own nameservers at all.
For all domain websites on your virtualmin server, just point A records at your virtualmin external ip address from any domains registrar and your server will sort the rest out.
Having said that, dont delete BIND...just leave all Virtualmin defaults as they are (you will have far less trouble down the track if you dont play around with Virtualmin auto install defaults unless someone very experienced in Virtualmin tells you too.)
Oh i almost forgot...its best to not use your domain (example.com) as your primary website on this virtualmin system, when it is also being used as the hostname.fqdn (server1.example.com) . Whilst i have mine setup this way, it does cause me some annoying problems!
hope this helps
If you need any further help, feel free to ask more questions and i will help where i can.
Note i am in Sydney Australia, so obviously consider my time zone when waiting for a reply.
kind regards Adam
https://ajecreative.com.au
Hi. I have an domain example.com that I intend to use as it is for the webmin. I have both registrar and dns with Cloudflare so I think it will propagate quickly. But when I test it just say connecting and nothing happens. Do I need to create a virtual server for this domain?
Anders Yuran
You don't need a Virtual Server added into Webmin/Virtualmin in order to use that to connect to the Webmin port.
So long as the domain resolves to the correct port, that should work with no problem.
If you're receiving a timeout when accessing it by domain name, but it works when accessing it by IP address -- that starts to sound like the IP address associated with the domain may not be correct (or the old IP may still be cached).
-Eric