Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can anyone tell me—in a nutshell—what the purpose of these two directories are in Debian?


I notice that diffing sites-available/000-default and sites-enabled/default shows they are identical.

What gives?

share|improve this question

migrated from Nov 11 '09 at 5:09

This question came from our site for professional and enthusiast programmers.

up vote 48 down vote accepted

sites-available contains the apache config files for each of your sites. For example:

<VirtualHost *:80>

  DirectoryIndex index.php
  DocumentRoot /home/user/public_html/

  LogLevel warn
  ErrorLog /home/user/public_html/
  CustomLog /home/user/public_html/ combined

When you want to add a new site (for example,, you add it here, and use:


To enable the site. Once the site is enabled, a symlink to the config file is placed in the sites-enabled directory, indicating that the site is enabled.

share|improve this answer
If you want to disable a site, you would run a2dissite – Jason Leveille Nov 11 '09 at 1:43
a2ensite and a2dissite are located in /usr/sbin which is currently not included in the default user path so tab completion won't work. When typing sudo a2 and pressing the tab key however you will be offered both a2ensite and a2dissite. – Stefan Schmidt Jun 29 '13 at 19:39

More important than the mechanics of the system is the rationale...

Debian provides the two separate directories so that if you're automatically managing your Apache configs, you can just have all of the vhosts drop into sites-available on all your machines, and then individual vhosts can be enabled on the server that will actually serve them. It also means you can near-instantaneously disable a site if it's causing problems (a2dissite; /etc/init.d/apache2 reload).

share|improve this answer
This one is true answer for original question. – silpol Nov 11 '14 at 10:04

To add to those above, the file in sites-enabled is a symlink to the sites-available file:

ls -l /etc/apache2/sites-enabled/

It’s not just the same content, it’s the same actual file!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.