Running Apache/2.4.16 (Ubuntu). I have a certificate with 5 subdomains (app, cdn, api, m, www/home).
I want undefined subdomains to 404. I guess https://domain.com/404 would be the appropriate place.
How do I do this and avoid "Your connection is not private" warnings?
Is this the correct way to handle this?
My conf looks like this (simplified heavily):
#APP
<VirtualHost _default_:443>
ServerName app.domain.com
DocumentRoot /var/www/html/app
</VirtualHost>
#CDN
<VirtualHost _default_:443>
ServerName cdn.domain.com
DocumentRoot /var/www/html/cdn
</VirtualHost>
#API
<VirtualHost _default_:443>
ServerName api.domain.com
DocumentRoot /var/www/html/api
</VirtualHost>
#M
<VirtualHost _default_:443>
ServerName m.domain.com
DocumentRoot /var/www/html/m
</VirtualHost>
#HOME
<VirtualHost _default_:443>
ServerName domain.com
ServerAlias www.domain.com
DocumentRoot /var/www/html/home
</VirtualHost>