Sunday, March 20, 2016

Apache subdomain virtualhosts over SSL

I've been scouring Google over the last couple of days, trying to find out how to setup subdomains over https without having to do IP-based virtualhosts or creating self-signed keys. It turns out the solution is pretty simple: set "NameVirtualHost *:443" (without quotes, of course) at the top of your SSL virtualhost config, and then you can proceed with setting up your virtualhosts as usual (I'm also redirecting all http traffic to https). For example: