|
Apache policy
PROPOSAL |
The first version of the Debian Apache Policy |
The objective of the apache policy is to make the different apache packages (apache, apache-ssl, apache2) similar to each other and make packages that depends on apache (like php4, horde and similar) easier to install because there are a common way to configure them.
The acronym $apache (below) is used as an acronym for apache, apache-ssl, apache2 or later apache versions.
There are a common location for external packages to place configurations to apache /etc/apacheconf.
/etc/apacheconf/webapp.d (general apache related webapp configs) /etc/apacheconf/config.d (general apache related configs)The name of this should be discussed.httpd.conf should contain (by default) just the most basic information like the primary servername, NameVirtualHost, similar things and the inclusion directives to start the most basic apache server.
2.1 Apache packages
Apache packages is packages that provides the virtual package apacheconf.
The apache configuration must (but only by default) include the following files or directories:
/etc/$apache/modules.load /etc/apacheconf/config.d /etc/$apache/config.d /etc/apacheconf/webapp.d /etc/$apache/virtual.dThis should of course only be by default in the configuration files so that earlier configurations are not currupted and to make it possible for the administrator to override this. The configure script should have some mechanism to give the administrator a way to select theese things.The index page to show that apache is installed should be placed in /usr/share/$apache/default/index.html with a clear description for the administrator to point it somewhere else (like /var/www).
2.2 Add on packages
Add on packages are packages that gives apache some extra functionality (like mod_auth_foo).
2.3 Web programs
Web programs are packages provide some web content (dynamicly generated mostly).
Apache related and virtual location independent configurations should be placed in /etc/apacheconf/webapp.d/Xname.conf
Apache related and virtual location dependent (like aliases) configurations should be placed in /etc/apacheconf/visible.d/Xname.conf. This is needed because else all virtual hosts will get aliases for all webapps which probably is not what the administrator wants.
X is a priority number to make sure some modules are included before other ones.
Apache module configurations are placed in /etc/$apache/modules.d and loaded modules are symlinked from /etc/$apache/modules.load
No symlinks from modules.load are allowed in a package file. The must be generated by a postinst script or by the administrator.
Ideally this should be done in a debconf script for each apache package.
Some technical issues still exist.
- The first thing is if the Include directive include all files or just some extensions. This is interresting for .dpkg-old and .dpkg-new files that can be created and cause problems. If it does we have to use a lot of symlinking too.
- The other thing is if symbolic links is also included. If not we have a problem.
Apache task force project page
Copyright © 2004 Ola Lundqvist |
|