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:
- Assume that you have mymaindomain.com as your default website for the single IP address of your VPS.
- Assume that you have mydomain1.com as the parent server for the alias you want.
- Create an alias subserver for mydomain1.com called static.mydomain1.com Important: You MUST put a checkmark for DNS domain enabled? (just good practice as suggested)
- You cannot request for SSL in static.mydomain1.com, you have to do this from mydomain1.com. The options presented there are now as follows (just click request certificate):
Important: You MUST put a checkmark for Apache website enabled?
(I am sure that last month I did not have to do this. Today if I do not check this, the alias is taking me to mymaindomain.com. This makes me wonder, what is the purpose of having the option unchecked? Can anyone tell me?)
mydomain1.com
www.mydomain1.com
mail.mydomain1.com
autoconfig.mydomain1.com
autodiscover.mydomain1.com
static.mydomain1.com (this url is now accessible)
www.static.mydomain1.com (this url is now accessible)
mail.static.mydomain1.com (this url is now accessible)
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?