I had seen various apache2 administration commands – I though it was time for me to clear things up, as I used to configure everything from the apache.conf configuration file (which now seems to be extremely old school)
/sites-available
/sites-enabled
When installing apache2, there are 4 folders which comes under /etc/apache2 folder:on one side, and
/mods-available
/mods-enabled
on the other side.
The /sites-available folder is supposed to contain the configuration files of the sites (e.g., the configuration details of the corresponding virtual host), and the /sites-enabled contains symlinks to those configuration files. Only the sites symlinked in /sites-enabled will actually be served by apache2.
Similarly, /mods-available contains the configuration files of all apache modules installed, /mods-enabled contains symlinks to the modules to be actually enabled. It is to be note that some mods have actually two configuration file: one .load, with a LoadModule command (that all modules have), and one optional .conf, with misc configuration commands specific to the module.
Now, there are four commands to enable/disable sites and modules:
a2ensite [sitename]: enable site [sitename] where sitename is the name of the site configuration file
a2dissite [sitename]: disable site [sitename]
and
a2enmod [modname]: enable mod [modname]
a2dismod [modname]: disable site [modname]
These commands will create / remove the necessary symlinks.
