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.
On Sat, Nov 19, 2011 at 9:15 AM, Happy Melon <happy.melon.wiki(a)gmail.com>wrote;wrote:
On 19 November 2011 12:27, Dmitriy Sintsov
<questpc(a)rambler.ru> wrote:
On 19.11.2011 2:15, Olivier Beaton wrote:
Debian already solves this through a rename hack.
For example the
default
> virtualhost is named 000-default so that it gets loaded first.
> Similarly, I've had to rename module links so they are loaded before
> others (dav before svn). It's fairly straight forward and once you
have
a
> lot of modules or vhosts, you'd curse every time you opened a 5,000+
line
conf
file.
I don't think that is a good solution. Because inserting / moving a
vhost in-between requires a rename chain and multiple filename renames
probably are not atomic. Can one make multiple renames in one kind of
transaction (locking the dir, multirename, unlocking)? I don't have any
troubles opening single 350 line conf file in vim (with syntax
highlighting) and after copy / cut / paste, storing the "monolithic"
vhosts.conf file is atomic (like transaction).
Dmitriy
No, you can always create a new filename that will sort between two others
without needing to rename either of the other two. And you can always
change *a* filename without altering the sort order of the collection. So
if you have a "000-default" file and then a set of "100-foo" files
that
must load after default (but it doesn't matter how they load amongst
themselves), then another set of "200-foo" files that must load after the
100- files, you can always choose a name ("050-", "100-",
"150-", "200-" or
"250-") that will cause it to load at the time you need, without having to
rename any other files.
--HM
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l