Checks Syntax of Configuration Files
apachectl -t
Lists Loaded modules
apachectl -m
Lists Enabled Sites
apachectl -S
Starting, Stopping, Reloading, Restarting
sudo service apache2 start|stop|reload|restart
Enable/Disable Site, Enable/Disable Mod
sudo a2ensite example.co.uk.conf # enables conf file
sudo a2dissite example.co.uk.conf # disables conf file
Tip: Note that you can use tab to autofill the configuration files, as bash will know where the files are once you type
a2ensite
ora2dissite
.
sudo a2enmod <module> # enables a module
sudo a2dismod <module> # disables a module
/etc/apache2/apache2.conf # main configuration file
/etc/apache2/sites-available/example.co.uk.conf # example site