Help a newbie with Nginx

Well, that seems pretty simple enough. So right now, I only have 1 Virtual Server that was created during the Initial process for the webhost,domain,com. I have not touched any other configuration.

When I go to either webhost,domain,com or domain,com, I get this page.

Well begun is half done. :+1:

To check how things stand, could you visit admin.domain.tld and admin.webhost.domain.tld and report to us what you see?

Good morning,

So, when I go to admin.domain.tld, I get the same page that says “Under Construction”, and when I go to admin.webhost.domain.tld I get this error page.

Hmm. This indicates a problem either with the DNS records of the domain or the values you have entered in Virtualmin’s post install wizard.

How do you manage DNS for domain.tld (your own domain). Do you use Virtualmin DNS at all? Do you have a test domain that can be pointed to Virtualmin’s DNS servers to check if it resolves as it should?

No sir, I manage them with bluehost, since that’s where the website used to be hosted, I stopped the host service because I want to do it myself, but I still have my domains with them. This is how the DNS servers are on the domain right now. This is not a live website, so we can do any testing you want, it doesn’t really matter to me, this is just a personal project for me.

image

That’s great, let’s see if we can’t get the admin and webmail subdomains to redirect to ports 10000 and 20000 respectively.

See

And also

Good morning @calport , when you talk about the 5 domains to add to the A Records, I had already configured the following.
domain,com
www,domain,com
mail,domain,com
admin,domain,com
webhost,domain,com
www,webhost,domain,com
vpn,domain,com

I just have a couple of questions, when you say in the example, set the name servers to ns1,domain,com, do you mean add an A record or change the DNS Name Server that I should you above to the domain? Also, I think DNS records are a little complicated on BlueHost, is there a provider that works better with Virtualmin DNS? I am always open to changing whatever is needed to make it easier on myself.

Thank you

Change the A record is what I mean. If you do so, you could use your vanity nameservers on other domains that you may wish to host on your Virtualmin system.

Your question is flawed.

Virtualmin is a DNS provider or you are, actually, as owner of a Virtualmin system. Once you set up ns1 and ns2 correctly on Virtualmin (as part of the post-install wizard), all the operations that you are doing in the BlueHost control panel with regard to setting A records etc, your clients will be doing on your Virtualmin system for their domains.

Virtualmin has its own DNS server and it can be used as authoritative for all the domains that you host on your Virtualmin system.

To keep things simple at the beginning, point ns1 and ns2 to the Virtualmin IP, enter those as name servers in the post install wizard and specify ns1.domain.tld and ns2.domain.tld as nameserver for all other domains that you wish to host on your Virtualmin system except domain.tld. Leave domain.tld nameserver with BlueHost for now.

I understand, that is awesome that Virtualmin can do that. It’s much more feature rich than I thought.
I have changed the DNS records to ns1,domain,com and ns2,domain,com. I’m taking the kids to the waterpark while the DNS propagates. What should I test when I come back to make sure it is working? Thank you.

If it works, you will see the Virtualmin under construction page when you visit the URL.

Have fun with the kids!

Wouldn’t you need 2 VM’s to run your own, also how is secondary name server setup in VM?
P.S. I just read the FAQ http://www.virtualmin.com/documentation/dns/faq/
Ok I alway thought NS2 (secondary) read what was in NS1 (primary) and was a backup on another server. the FAQ seems to say NS1 and NS2 are the same domain name server.

You are right, @stefan1959. That’s the way it is supposed to be and that’s the way it was back in the day when we would put ns2 on another server which was on another network from ns1, so that redundancy was built into the design of the ecosystem.

But we have since then broken the internet and deviated from standards in so many ways. This is one of them: ns1 and ns2 can now be on the same vps. :slight_smile:

Are you using the same IP, or have you allocated 2 ips?

Same IP for everything.

Just add it in the box below the one for the primary name server in the post install wizard. That’s all there is to it.

Good morning, sorry for not responding yesterday, I did the tests and now I am getting DNS errors on the domains. So what I did was removed all the A Records on BlueHost and started fresh, so far this is how the domain is configured in BlueHost.

ns1,domain,com - PublicIP
ns2,domain,com - PublicIP
image

The second one is just domain,com

Should I add anything else to the records?
Also, since we’ve gone beyond Nginx and you said all that is done by Virtualmin automatically. I decided to start fresh, deleted the VM, I am recreating it on Ubuntu Live Server 20.04, and this time I will install with Apache.

Good idea to start fresh.

So for domain.tld, the nameserver at BlueHost will handle the records (which you will set manually) so domain.tld will point to BlueHost nameservers

For clientdomain.tld the nameserver at Virtualmin will handle the records (automatically) so clientdomain.tld will point to ns1.domain.tld and ns2.domain.tld.

At a later stage, you can learn about glue records and configure domain.tld to point to ns1.domain.tld and ns2.domain.tld. Do not attempt to point domain.tld to ns1.domain.tld and ns2.domain.tld till you have had the glue records configured.

Oh, so I need to revert the ns1 and ns2 back to the BlueHost default ones, and then only set the DNS records for the other domains that I want to manage to ns1,mydomain,com and ns2,mydomain,com. Go it, I will revert that right now, and then I will run the new Virtualmin install, I will let you know when that’s done to see where we stand. Thank you!

Good morning @calport, so I have rebuilt the webserver, and changed all the A Records, now all 3 URLs, www,domain,com, webhost,domain,com and admin,domain,com redirect to the Virtualmin Under Construction page. What do I do now?