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/07/06 01:29:57 UTC

[Httpd Wiki] Update of "DebianDeb0rkification" by ChrisPepper

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 ChrisPepper:
http://wiki.apache.org/httpd/DebianDeb0rkification

The comment on the change is:
Cleanup

------------------------------------------------------------------------------
  == 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 difficulties arising from supporting new users in #apache. One of the main causes of headaches are people who are new to both Apache HTTPd and their Debian Linux system.
+ Like many articles here, the main purpose of this one is to ease the difficulties arising from supporting new users in #apache. One of the main causes of headaches there is 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, while preserving the various automations it provides. Please note that we will be working on the latest stable release.
+ This is a guide for how to make efficient use of the Debian configuration files, while preserving the various automations they provide. Please note that we will be working with the latest stable release.
  
  === apache2.conf ===
- Debian calls its main configuration file ''apache2.conf'', which is the first source of confusion, because there is also a ''httpd.conf'' file in the configuration directory:
+ Debian calls its main configuration file ''apache2.conf'', which is the first source of confusion, because there is also an ''httpd.conf'' file in the configuration directory:
  {{{
  jmcg@panic:/etc/apache2$ ls -ltr
  total 48
@@ -61, +61 @@

   -D AP_TYPES_CONFIG_FILE="/etc/apache2/mime.types"
   -D SERVER_CONFIG_FILE="/etc/apache2/apache2.conf"
  }}}
- The main problem of the ''apache2.conf'' file is not its name, but the lack of sane defaults, of which we will now rectify:
+ The main problem with the ''apache2.conf'' file is not its name, but the lack of sane defaults, which we will now rectify:
  {{{
  ## snip
  # Change the default of 15 seconds to a more conservative value:
  KeepAliveTimeout 2
  
- ## sip
+ ## snip
  
  # Leave this as is, as it makes sense (see below)
  # maybe change the name of the file..
  #
- # Define an access log for VirtualHosts that don't define their own logfile
+ # Define an access log for VirtualHosts that don't define their own logfiles
  CustomLog /var/log/apache2/other_vhosts_access.log vhost_combined
  
  # For reasons of paranoia, set this to Prod, instead of Debian's default 'Full'
  ServerTokens Prod
  
- # Same here, no one needs to know our version number:
+ # Same here; no one needs to know our version number:
  ServerSignature Email
  
  # This is what will be returned by the above:
@@ -98, +98 @@

      Deny from all
  </Directory>
  
- # Assuming /var/www/ is the root of all of your vhosts, we set sane defaults for it:
+ # Assuming /var/www/ is the root of all of your vhosts, set sane defaults for it:
  <Directory /var/www>
      Options +MultiViews
- # The user may add +Indexes if he wishes to display a formatted list of the directory contents in the absence of a index file specified with the ''DirectoryIndex'' directive. 
+ # The user may add +Indexes if he wishes to display a formatted list of the directory contents in the absence of index files as specified with the ''DirectoryIndex'' directive. 
      Allow from All
      AllowOverride None
  </Directory>
  }}}
- And that's it. Those are the additions/changes one has to do in ''apache2.conf'' in order to set sane defaults.
+ And that's it. These additions/changes in ''apache2.conf'' set sane defaults.
  
  === sites-enabled ===
- There's one marvelous attribute about Debian's configuration: the introduction of a default virtual host, and scripts to automate the addition/removal of ''sites''.
+ There's one marvelous attribute of Debian's configuration: the introduction of a default virtual host, and scripts to automate the addition/removal of ''sites''.
  
  The default ''sites'' file, called ''/etc/apache2/sites-available/default/000-default'', contains this:
  {{{
@@ -157, +157 @@

  
  </VirtualHost>
  }}}
- This configuration is overly verbose, complex, and, unnecessary. Instead of pointing out every configuration error in it, I will rewrite it from scratch:
+ This configuration is overly verbose, complex, and unnecessary. Instead of pointing out every configuration error in it, I will rewrite it from scratch:
  In ''apache2.conf'' change:
  {{{
  # Include all the user configurations:
@@ -176, +176 @@

  }}}
  Again, note the difference with the new ''VirtualHost *:80'' directive, to match the ''NameVirtualHost *:80'' directive set in the ''apache2.conf'' file earlier.
  
- We removed the CustomLog directive as the one defined in the ''apache2.conf'' will propagate to every virtual host - effectively reducing the number of open file handles.
+ We removed the CustomLog directive as the one defined in ''apache2.conf'' will propagate to every virtual host - effectively reducing the number of open file handles.
  
- We got rid of all the superfluous ''<Directory /var/www>'' and ''<Directory />'' blocks - especially with it's awkward ''Options'' directives. Again, with the sane settings in the ''apache2.conf'' file.
+ We got rid of all the superfluous ''<Directory /var/www>'' and ''<Directory />'' blocks - especially with its awkward ''Options'' directives. Again, with the sane settings in the ''apache2.conf'' file.
  
- We 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.
+ We 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, paste, and edit this file.