This is an old revision of the document!


Using and maintaining Apache 2.2 on Debian/Ubuntu Linux (some basic principles)

FIXME

Maintainability: strict separation of default config files and user-generated config files

Debian and Ubuntu are very maintainable operating systems. This is especially true regarding updates and keeping configurations traceable for you and third persons (e.g. another system administrator). To make this possible, they take care of a strict separation of automatically created default configuration files and user-generated configuration files.

The named characteristics are realized for the Apache HTTP Server as follows:

  • Central apache configuration files (system)
    /etc/apache2/ is the central configuration directory. You should not touch files located directly in this dir! The files there were created when you installed your Apache, enabling you to basically use the software. Changing these file is a bad idea because it may gets overwritten when you are updating the system:
    • /etc/apache2/apache2.conf (do NOT edit!)
    • /etc/apache2/httpd.conf (do NOT edit!)
    • /etc/apache2/ports.conf (do NOT edit!)
  • Apache is looking for user-generated *.conf files in the /etc/apache2/conf.d/ directory automatically.
    Therefore it is possible and recommended to create separate /etc/apache2/conf.d/this-conf-file-does-foo.conf files for every logical job you add. If you follow this rule, you will always know where you are configuring what, making updates, clearance and troubleshooting less painful. The files are included in alphabetical order, so you may use numerical prefixes to control which files are loaded first. Examples:
    • /etc/apache2/conf.d/0000-basic.conf – good place to add own, basic directives and defaults. The 0000- prefix makes sure that the file will be included first.
    • /etc/apache2/conf.d/ports_additional.conf – good place to add additional Listen directives.
    • /etc/apache2/conf.d/compression.conf – good place to configure mod_deflate/mod_gzip…
  • FIXME
Print/export
QR Code
QR Code app:apache-http-server:apache2-debian-ubuntu (generated for current page)
Languages
Translations of this page: