Initially I had only 1 domain so I had it as a default site in 000-default-le-ssl.conf. I then added vhosts for each subdomain with no issues. Now I have added another domain and I do not want any fallback between the domains. That is even if there is a bad config with apache I do not want one domain to serve content from another's directory/port.
I figured I would move the current default domain to it's own vhost and either have no default ServerName or have a generic error in an separate dir with index.html as a default fallback. (Is there a better way?)
The issue I am having is that if I remove the below config snippet from 000-default-le-ssl.conf all sub/domains on the server break with "ERR_SSL_PROTOCOL_ERROR".
ServerName domain.tld Include /etc/letsencrypt/options-ssl-apache.conf SSLCertificateFile /etc/letsencrypt/live/domain.tld/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/domain.tld/privkey.pem
Why does this happen? Why doesn't the vhost that contains same code snippet work? What am I missing here? I checked and the conf file/site is enabled. I also checked and default-ssl.conf is also overridden as DocumentRoot directive has no effect there. I removed ServerName from apache2.conf as well with no change. I can't think of any other config that would interfere. I am also redirecting http to https and www to non-www on all domains in a case it matters.
I am running latest apache on Ubuntu 18.04.