Apache 2 Commands
Maintaining apache2 sites and modules lists
This brief introduction for configuring sites and modules in Debian's Apache 2 package explains how to add and remove sites using the supplied tools, along with adding and removing modules.
The main source of confusion comes from the various directories stored beneath /etc/apache2:
sites-available - A list of configuration files - one per site. A blank install will contain the file default. The system admin can have as many sites here as they need - however - they will not all be active.
sites-enabled - A list of symlinks to configuration files in sites-available. A blank install will contain a symlink 000default to sites-available/default. The sites listed here are the sites which will be active. The site to be used if no virtual hosts match will be the first file found (hence the 000 on 000default).
mods-available - A list of configuration files - one or more per module. Each dpkg installed module will add files here. e.g. php4.conf and php4.load are added with the libapache2-mod-php package. Again - the system admin can install whatever modules they wish - however - until they are set available they will not be active.
mods-enabled - A list of symlinks to configuratioon files in modes-available. Only modules linked in here will be activated on the webserver.
Now - several discussions on #debian IRC channel on freenode recently have had people advising others to either copy files from the available to the enabled directories or to manually symlink them. The user has, however, a better option - the four commands a2ensite, a2dissite, a2enmod and a2dismod
a2ensite
a2dissite
a2enmod
a2dismod