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.

link|improve this question
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
feedback

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

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

1 Answer

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.

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

Your Answer

 
or
required, but never shown

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