sudo service apache2 restartand there was an error.
Often this means you have a syntax error or some other configuration issue in your host’s
.conf file in
/etc/apache2/sites-available. To see what line is causing it, run these two commands:
sudo service apache2 restart; sudo journalctl -xe
There are two commands there, separated by
;. We want to run both commands in quick succession before the logs fill up, making it hard to find the error.
Read the output to figure out what went wrong.