You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wiki-changes@httpd.apache.org by Apache Wiki <wi...@apache.org> on 2008/06/29 16:42:50 UTC
[Httpd Wiki] Update of "DebianDeb0rkification" by thumbs
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Httpd Wiki" for change notification.
The following page has been changed by thumbs:
http://wiki.apache.org/httpd/DebianDeb0rkification
------------------------------------------------------------------------------
== Debian Deb0rkification ==
Title suggested by thumbs. Please note that this is a first draft. Any comments are most welcome.
- Like many articles written here, the main reason is to lighten the pain of supporting #apache. One of the main causes of head-ache are people who are new to both Apache HTTPd and their Debian Linux system.
+ Like many articles written here, the main reason is to lighten the difficulties arising from supporting #apache. One of the main causes of headaches are people who are new to both Apache HTTPd and their Debian Linux system.
- This is a guide how to make efficient use of the Debian configuration files. Please note that we will be working on the latest release.
+ This is a guide how to make efficient use of the Debian configuration files. Please note that we will be working on the latest stable release.
=== apache2.conf ===
Debian calls it's main configuration file ''apache2.conf'', which is the first check-point of confusion, because there is also a ''httpd.conf'' file in the configuration directory:
@@ -61, +61 @@
-D AP_TYPES_CONFIG_FILE="/etc/apache2/mime.types"
-D SERVER_CONFIG_FILE="/etc/apache2/apache2.conf"
}}}
- The main problem of of the ''apache2.conf'' however, is not it's name, but it's lack of sane defaults, of which we will no take care:
+ The main problem of of the ''apache2.conf'' however, is not it's name, but it's lack of sane defaults, of which we will now rectify:
{{{
## snip
- # Change the default of 15 seconds to something sane:
+ # Change the default of 15 seconds to a more conservative value:
KeepAliveTimeout 2
## sip
@@ -90, +90 @@
# This is for usability:
AcceptPathinfo On
- # Debian puts this in their overly verbose Default VHost, but that's just silly
+ # Debian puts this in their overly verbose Default VHost, but that's unnecessary. A single instance before all the virtual hosts is sufficient
<Directory />
Options FollowSymLinks
AllowOverride None
@@ -108, +108 @@
And that's it. Those are the additions/changes one has to do in ''apache2.conf'' in order to set sane defaults.
=== sites-enabled ===
- There's one marvelous attribute about Debian's configs and that's the introduction of vhosts per default. With the addition of scripts to manage ''sites''.
+ There's one marvelous attribute about Debian's configuration and that's the introduction of a default virtual host. With the addition of scripts to manage ''sites''.
- And then there's this gross thing in ''sites-enabled'' that is the default-vhost, which people take as example, copy and paste and create chaos:
+ And then there's this peculiar section in ''sites-enabled'' that is the default-vhost, which people take as example, copy and paste and create chaos:
{{{
NameVirtualHost *
<VirtualHost *>
@@ -156, +156 @@
</VirtualHost>
}}}
- This configuration is overly verbose, complex, and, unneccessary. Instead of argumenting what's wrong with it, I will simply move on to show how to do it better:
+ This configuration is overly verbose, complex, and, unnecessary. Instead of pointing out what's wrong with it, I will simply move on to show how to do it better:
In ''apache2.conf'' change:
{{{
# Include all the user configurations:
@@ -164, +164 @@
NameVirtualHost *:80
Include /etc/apache2/httpd.conf
}}}
- Note the subtle difference here: ''NameVirtualHost *'' is ambigous. It covers all interfaces and all ports, potentially breaking future additions of SSL-aware sites.
+ Note the subtle difference here: ''NameVirtualHost *'' is ambiguous. It covers all interfaces and all ports, potentially breaking future additions of SSL-aware sites.
{{{
<VirtualHost *:80>
ServerName some.domain.tld
@@ -177, +177 @@
We removed the CustomLog directive as all are catched by the one defined in the ''apache2.conf'' - thus effectively reducing the number of open file handles.
- We got rid of all the superfluous ''<Directory>'' blocks - especially with it's borken ''Options'' directives. Again, with the sane settings in the ''apache2.conf''.
+ We got rid of all the superfluous ''<Directory>'' blocks - especially with it's awkward ''Options'' directives. Again, with the sane settings in the ''apache2.conf''.
- And defused the danger of ambiguity, by changing, and moving the ''NameVirtualHost *:80'' directive above the ''Include'' line for the vhosts, thus enabling newbies to simply copy and paste and edit this file.
+ And defused the danger of ambiguity, by changing, and moving the ''NameVirtualHost *:80'' directive above the ''Include'' line for the virtual hosts, thus enabling new administrators to simply copy and paste and edit this file.