Log Files
sudo cat /var/log/apache2/error.log
sudo cat /var/log/apache2/access.log
Commands
Get info about Apache:
/usr/sbin/apache2ctl -v
To stop your web server, type:
sudo systemctl stop apache2
To start the web server when it is stopped, type:
sudo systemctl start apache2
To stop and then start the service again, type:
sudo systemctl restart apache2
If you are simply making configuration changes, Apache can often reload without dropping connections. To do this, use this command:
sudo systemctl reload apache2
Check the status of Apache.
sudo systemctl status apache2
Get the host name for Apache:
hostname -I
Get the public IP address for the server. (see major.io/icanhazip-com-faq for details).
curl -4 icanhazip.com