Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

Cheers

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

share|improve this question

migrated from stackoverflow.com Sep 28 '11 at 17:37

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

1  
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: httpd.apache.org/docs/2.0/vhosts/mass.html –  DrDeth Sep 28 '11 at 13:09

1 Answer 1

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
1  
Don't forget the helpful reminder to reload Apache. :-) –  xofer Sep 28 '11 at 17:57

Your Answer

 
discard

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.