I have a gitolite development server and I'm trying to automate creation of new virtualhosts.
I figured rather than try to have the gitolite user (non root) create new config files in /etc/apache2/sites-available I would symlink a /home/gitolite/sites-available directory to it.
I can run this:
sudo ln -s /home/gitolite/sites-available/* /etc/apache2/sites-available/
and then I can see the sites in the symlinked directory
default symlinkedsite.com nonsymlnkedsite.com
But it would seem to me that I would need to re-run that command if I created a new file, so it doesn't accomplish what I need.
I originally was trying this
sudo ln -s /home/gitolite/sites-available /etc/apache2/sites-available/
which creates a symlinked sites-available directory in /etc/sites-available
But if I run a2ensite it can't follow that symlink.
I know that in order for an apache2 virtualhost to use symlinks, followsymlinks must be enabled. Is there a similar option for the apache2 sites-available config directory?
I scanned apache2.conf but I didn't see something obvious.