I've started administering a clutch of CentOS based webservers in a new job, and after a couple of years of using debian based linux servers, I've got fairly comfortable with the apache file structure along the lines of below:
/etc/apache2
apache2.conf
conf.d/
envvars
mods-available
mods-enabled
ports.conf
sites-available
sites-enabled
This makes sense to me modules that are available to me but not necessarily in use are in mod-available
, and ones in user are in mods-enabled
, likewise with the sites
directly. Granted, these are mainly symlinks, but I can understand why it's done like this; coming to the system fresh I have a rough idea of what's up on the system, by looking in the relevant *enabled
directories.
By comparison CentOS's setup is like so:
/etc/httpd
conf
conf.d
logs -> ../../var/log/httpd
modules -> ../../usr/lib64/httpd/modules
run -> ../../var/run
I can understand that I can see which hosts are enabled by calling apachectl -S
, and apachectl -M
to see the modules, and renaming /conf.d/example.conf
to conf.d/example.conf.disabled
would allow me to disable sites fairly simply too, but I don't understand why these are different in the first place, and right now, I'm not sure of the advantages of doing it one way or another.
Are there any pages, blog posts or sites around to help explain the differences between the two, and possibly some of the thinking around why they're set up like this?
Right now I'm blindly following the convention I'm seeing in the standard CentOS file system without understanding why, which I can't help feeling will bite me when I least it expect it, like when I blunder across selinux's permissions layer, or something similar.