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

I have set up VirtualHost files from scratch before and only recently come over the a2ensite command. I think this is a great command and very useful, but most of my sites configured have the same settings (such as ssl certs, basic auth etc).

Is there a way I can change what a2ensite writes to in my sites-enabled directory when I use it? For example, automatically putting my ssl certs in, etc.


P.S. On 11.04 Ubuntu Server with Apache2 installed. Permissions to install further software.

share|improve this question

migrated from Sep 28 '11 at 17:37

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

The a2ensite script just creates a link to the existing config file in the sites-available directory. It doesn't actually write a new file. This link may be useful to you: – DrDeth Sep 28 '11 at 13:09
up vote 2 down vote accepted

a2ensite only creates the correct symlink in sites-enabled to allow the site configured in sites-available to be served.

share|improve this answer
Don't forget the helpful reminder to reload Apache. :-) – xofer Sep 28 '11 at 17:57

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.