Sub server or normal server confusion

SYSTEM INFORMATION
OS type and version Ubuntu Linux 20.04.5
Virtualmin version 7.3-1
Virtualmin Build LEMP

OK, seems like a daft question but what exactly (laymans terms) is the difference?

I have created a “sub-server” with a name 999.example.com (where example.com is being hosted) I put up a CNAME record on the DO panel. and everything seemed to work. I could browse to both the site and the parent site.

I read somewhere on here that this was not the way to do this in Virtualmin because “sub domains” were not supposed to be used as real sub domains but were for the management of different users.
So I created the next sub domain as a Virtualmin “sub-domain of” as 991.example.com again with a CNAME record on the DO panel. But this has failed and I do not understand why.

I think the failure has something to do with the way that Nginx is set up. Looking in a browser for 991.example.com just shows the parent site example.com with no SSL (it was never requested as a sub domain from LE) Yet the parent site does have a SSL and still shows correctly. So there is no *.example.com LE cert. There is also no public_html directory created under /home/example.com/domains/991.example.com/ which is where I was expecting it. So, where exactly should I place the code for this site? and should I go back in Virtualmin and tick the box for the *.example LE cert ?

NO! that was a bad idea
LE simply refused any cert
(fortunately unticking - default - the box and re-requesting gave me back a new cert) for the parent site

I just answered the same question yesterday: Sub-Server or new Create Virtual Server - #2 by Joe

Wildcard certs are almost always a mistake (they have security implications, and they are more complicated to validate). To validate them Virtualmin must be managing your DNS (either locally or via one of its cloud-based methods of managing DNS, such as via Cloudmin, or any of the supported cloud DNS providers).

But, again, you should not use wildcard certs in the general case.

In the future, please open new topics for different questions (i.e. a Let’s Encrypt question is independent of a sub-server question).

1 Like

@Joe, Yes that I have gathered, from your reply and from the attempt at getting a *.example.com from LE. - Never again!

However, I’m still confused about sub-servers (doh! my numbscull)
the site needs to be found at 991.example.com (example.com is up and running with a different site)
I tried setting up a new Virtualmin “top level” site as 991.example.com (This of course fails to obtain a LE cert) so I tried giving it a name of 991_example.com because Virtualmin does not care

but that will also fail because the domain doesn’t exist (might as well be abc.abc)

As “sub-server” worked for 999.example.com I assume it should for 991.example.com and so I’m back to not understanding what the difference is.

OK. Got this one sorted. Yet again really a LE problem along with ( :doughnut: here) I forgot to add an A record for the www.991.example.com → LE seems to ignore CNAME

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.