The goal here is to implement a static asset domain so that CMS can do cookieless transfers.
What is the best way to create an alias-subserver (static.somedomain.com) that can serve all files in www.somedomain.com and can have its own SSL certificate?
My Solution:
NOTE: If the VS mydomain1.com already exists and you have already an SSL installed, by creating the static alias (point #3) , Virtualmin will do step 4 automatically for you! Thanks VA!
My questions:
1. What is the purpose of having the option "Apache website enabled?" unchecked? Is this a useless option?
This creates an NON-ALIAS for the mydomain1.com but instead is an alias for mymaindomain.com and uses the SLL from mymaindomain.com.
This creates problems when requesting SSL, failing with '404 Not Found DNS-based validation failed', because it cannot create '.well-known' in mymaindomain.com.
Since it is using the mymaindomain.com SSL, it also is useless as a static domain for mydomain1.com causing problems in the browser 'Failed to load resource: net::ERR_CERT_COMMON_NAME_INVALID'
2. As already mentioned, I am pretty sure that last month I left "Apache website enabled?" unchecked, and enabled only 'DNS domain enabled?'.
This created the alias to mydomain1.com OK, and all I had to do was request a certificate by manually adding 'static.mydomain1.com' to the list (after autodiscover).
I still have the VPS to prove it. Was it just a fluke?
Howdy,
The "Apache website" features specifies whether there is an entry in the Apache config for the domain in question.
If that option is disabled, that website shouldn't be accessible via a web browser -- you'd instead only see the default website when browsing to that domain.
It should be no problem to request an SSL cert for an alias with that feature enabled, that's how most folks gets certs for things like a main example.com domain, and then an alias example.net domain.
If that's not working, that means something is awry, and would just require some troubleshooting to figure out what.
-Eric
Still, I want to know the usage of an SSL certificate on static.mydomain2.com, which redirects to mymaindomain.com.
I want to understand this.
From my testing:
mymaindomain.com
static.mymaindomain.com
mydomain1.com
static.mydomain1.com
mydomain2.com
static.mydomain2.com
mydomain3.com
static.mydomain3.com
mydomain4.com
static.mydomain4.com
When "Apache website enabled?" is unchecked, SSL request failed on 2/5 domains with 404.
(I think creating an index.html at the root of mydomainN.com and accessing it wakes up Apache so it will allow access to .well-known)
Anyway, all static domains were redirecting to mymaindomain.com (even the ones which got an SSL), so I had to give that method up.
PS. To All - It is difficult to troubleshoot this issue - you have to have a few domains to play with, so don't bother. Just keep in mind.