Question RE: ssl certs & subdomains

Hi, more a ssl related question than virtualmin probably but, here goes;

server is set up as follows:

host/default: ns1.name.com
virtual1: name.com
v2: sub.name.com
v3: sub2.name.com

Each have a dedicated (public) ip address and are actual subdomains/sub servers with their own document routes, and apache is set for ip virtual host.

Previously I hadn’t used subservers at all and everything under .name.com/ was the same IP and the same ssl cert which simply had name.com and *.name.com.

So my question, when the subdomains are setup like this, am I still able to use one certificate to cover them all? Or do/should I have them each separate (I thought I remembered seeing somewhere that ssl certs were ip-specific on virtual hosts but i can’t recall).

Thanks

SYSTEM INFORMATION
OS type and version Alma 9 .1
Webmin version 2.001
Virtualmin version 7.5pro
Related packages IP based virtual hosts

Sub-servers have their own VirtualHost, and thus should have their own certificates. There is no easy way to validate a server and a sub-server for the same certificate using web validation, since they don’t share public_html dirs.

Only DNS validation would work for that scenario (and DNS validation is not generally recommended, since folks already have a lot of trouble with DNS, in the general case, when not managing it in Virtualmin…and often even when they are).

Wildcards would also work, but a wildcard is not recommended for a variety of reasons including some pretty serious security implications, and wildcards also can only be validated via DNS validation.

Awesome, thanks. Kinda what I’d assumed to be the case just wanted to be sure.

Separately, is there any harm in changing the “default” servers doc root to line up with the rest under /home/me/domains (in regards to all; the nameserver, subdomains, and other domains). So instead of

/var/www/html (ns1.main.com)
/home/me/domains/(other-subs)*.main.com/public_html
/home/domain2.com/public_html
/home/domain3.com/public_html

have everything in one place;

/home/me/domains/main.com/html
/home/me/domains/ns1.main.com/html
/home/me/domains/(other-subs)*.main.com/html
/home/me/domains/two.com/html
/home/me/domains/three.com/html

I would be the only user/domain owner on the server, if that changes anything.

If I’m root, I very much prefer to have separate domains (one virtual server per website).

The reason is isolation. Every new virtual server in Virtualmin is a new user. Sub-servers are owned by an existing virtual server.

If you separate them, you get some security benefits (each site runs under it’s own home, with its own database user, etc.), some maintenance benefits (isolated sites are easier/faster to backup, easier to split up to multiple servers, if you need to do that for scaling or staged migrations), at the cost of maybe a little less convenience (ssh/FTP will require you to use a different user for each domain).

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