This on a Raspberry Pi 2. When I add a second virtual host to the 000-default.conf file, and restart apache2, it gives me this error:
[....] Restarting apache2 (via systemctl): apache2.serviceJob for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.
failed!
When I run systemctl status apache2.service, it gives me
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2)
Active: failed (Result: exit-code) since Mon 2016-09-05 22:52:11 MDT; 2min 34s ago
Process: 584 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
My 000-default.conf file (first virtual host works just fine by-itself):
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /home/pi/public_html
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:443>
ServerName alexspi2.local
ServerAdmin (email address, not shown for privacy)
DocumentRoot /home/pi/public_html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/apache2/ss1/ca.crt
SSLCertificateKeyFile /etc/apache2/ssl/ca.key
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
I don't know what is wrong with the second part.