Is it possible for me to have two virtual hosts (ports: 80 & 443) in one config file? i.e.
/etc/apache2/sites-available/example.test.conf
<VirtualHost *:443>
ServerName example.test
DocumentRoot /var/www/example.test/public
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/example.test.crt
SSLCertificateKeyFile /etc/apache2/ssl/example.test.key
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName example.test
ServerAlias www.example.test
DocumentRoot /var/www/example.test/public
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
I ran sudo a2ensite example.test.conf and restarted Apache.
Upon trying the above (https://example.test) setup, I receive:
In the browser. So, not the actual site contents? It's fine when served over http

/sites-available/and there's no indication you've useda2ensiteto enable themsudo a2ensite example.test.conf