On 19.11.2011 20:23, Olivier Beaton wrote:
And it should be noted that all you rename in
debian-apache are softlinks
in the mods-enabled and sites-enabled directories. You would keep regular
non-prefixed filenames in mods-available and sites-available. Using this
method you could also allow some of your users to own the files themselves
(although this is a security risk, you may want to install a panel if you
have many users).
If you don't need to micromanage the load order of a module, debian
provides some useful commands for enabling and disabling mods and sites.
a2enmod a2dismod,
a2ensite a2dissite.
They merely take the name of the module / vhost in -available directories
and it creates or removes the site without having to comment out large
chunks of files. And by using these soft links you can keep the
configuration for the vhost while still removing it, without having to move
it or rename it. It's convenient.
From what I understand all this isn't great
with puppet though, and many of
those users (like wmf) just flatten the whole thing
into a single
configuration file, which is your prerogative.
If one wants to have their virtual hosts in separate small files, there
is much better setup than Debian / Ubuntu offers:
1. Create separate small virtual hosts files as usual.
2. Include them line by line in main httpd.conf file.
3. Change of virtual hosts order is a simple line cut / paste in
httpd.conf file. Enabling / disabling one virtual host is just a #
character in the start of the line.
4. No symlinks, no silly numeric prefixes.
5. The utility that manages these one line includes in httpd.conf can be
developed as well.
6. Single httpd.conf file read/write is atomic.
7. There is no guarantee that every FS will list the filenames in dir in
ascending literal order. Although modern do, of course.
etc.
Dmitriy