I’ve searched and read the docs and forum posts but just need a bit of clarity/ help please where a few possibly obvious (not to me) questions are coming up while I try to setup Virtualmin on an Amazon lightsail instance and I’m having endless trouble figuring out the correct way to set things up and keep getting errors. I’m looking for information on the technically “correct”/“ideal” way to set these settings:
I’ve got a domain name set up to use Cloudflares DNS servers and have just two “A” name entries in DNS:
“mysuperdomainname-co.uk” points to my Amazon Lightsail instance static IP
“www” also points to my Amazon Lightsail instance static IP
I’ve setup an Ubuntu 18.04 instance and installed Virtualmin in the normal way. All seems ok…
When it comes to the Post-installation Wizard, the “Primary nameserver” field automatically picks up “ip-172-26-2-116,eu-west-2,compute,internal” which clearly isn’t going to work.
First question is, do I set this to something like “srv,mysuperdomainname,co,uk” and then add another “A” name entry into Cloudflare DNS pointing “srv,mysuperdomainname,co,uk” to my Lightsail public IP?
The DNS flow, as far as I can tell (let me know if wrong) is:
Domain name gets resolved at Cloudflare DNS -> Gets sent to my Lightsail public IP -> Gets sent to Virtualmins DNS Bind -> Gets sent to whichever Virtual Server is configured?
Next, like others, I got the " 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" notice when checking configuration… I click through to Hostname and DNS Client settings and see the following:
Resolution order: Hosts file, DNS
DNS servers: 127,0,0,53
Search domains: eu-west-2.compute.internal
So I move 127,0,0,53 down one line and add 127,0,0,1 to the first line, as instructed.
Second question: What are correct/valid values for Hostname here and how does it impact the Virtualmin installation and DNS Bind feature? Would it work/be a good idea to make it “srv,mysuperdomainname,co,uk”? I’ve set it to “msc”, is that good enough/technically ok?
Also, what does the Search domains value need to be?
The other main difficulty I’m having is that my primary domain name, “mysuperdomainname,co,uk” which points to the Lightsail instance static IP, is the same domain name I want to use to set up as a virtual server (with associated LAMP setup). I’ve tried this and it seems to work but I keep having issues with SSL and I’m wondering:
Does it create a conflict if the same domain name associated with the main server (Lightsail instance) and Virtualmin installation, is then used to setup a Virtual Server within Virtualmin? If this is not technically a problem, what’s the correct way to set this up in relation to the above questions about DNS, hostnames etc so that the domain name (with SSL - I’d like to use LetsEncrypt for this) works to access both Virtualmin on port 10000 and otherwise resolves to a website hosted as a Virtual Server?
I think that the Amazon Lightsail instance has certain built in settings that need to be configured correctly that I’m not able to figure out how it all should link together. For example, the System hostname shown in System Information is currently
“msc,eu-west-2,compute,internal” and I get the sense that this isn’t going to work? What other settings do I need to check that Lightsail might be setting in order to allow Virtualmin to work correctly?
Would really appreciate some help with the above questions. I know enough to know the answers are probably obvious to someone who already knows but I’m struggling to figure out how it all fits together when using Virtualmin on Lightsail and how that links to the DNS settings (in Cloudflare).
I’m also happy and able to get in and edit some files manually if needed but again, from reading through forum posts and documentation, I’ve not yet been able to find out which files to check, where they’re located and what the entries in them needs to be.
(PS I’ve replaced periods with commas in the above because as a new user I can’t post more than 2 “links”)