Hot answers tagged


This is not possible without a wildcard certificate or a certificate for the subdomain. You could create a cert for each of your subdomains using Let's Encrypt though (assuming cost is the issue).


Your configuration looks fine. Maybe you have some other issue like .htaccess redirection or you are trying to access your domain with https, but it hasn't been configured properly. Also look at the access.log when you enter the new domain. tail -f /var/www/ Edit1: If you are forcing the domain to go to https and not installed ...


You don't want to have multiple VirtualHost blocks with the same ServerName value. Instead you want to have a single VirtualHost block per ServerName and use either ProxyPass of RewriteRule to route the traffic to the appropriate backends. Here's an example using ProxyPass: <VirtualHost *:80> ServerName ProxyPreserveHost On ...

Only top voted, non community-wiki answers of a minimum length are eligible