<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>AskApache &#187; Search Results  &#187;  mod_python</title>
	<atom:link href="http://www.askapache.com/search/mod_python/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.askapache.com</link>
	<description>Advanced Web Development</description>
	<lastBuildDate>Thu, 26 Apr 2012 11:29:28 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Ultimate Htaccess Part II</title>
		<link>http://www.askapache.com/htaccess/apache-htaccess-2.html</link>
		<comments>http://www.askapache.com/htaccess/apache-htaccess-2.html#comments</comments>
		<pubDate>Sat, 16 Oct 2010 16:11:33 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Htaccess]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=4693</guid>
		<description><![CDATA[<p><a href="http://www.askapache.com/htaccess/apache-htaccess-2.html"><img src="http://uploads.askapache.com/2010/10/htaccess-editing-350x243.png" alt="Editing an Apache .htaccess file in VIM." title="htaccess editing" width="350" height="243" class="size-medium wp-image-4700" /></a>  Here is even more information from the <a href="http://www.askapache.com/htaccess/htaccess.html">Ultimate Htaccess Part I</a>.  For now this is very rough and you will want to come back later to read it.</p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.askapache.com/htaccess/apache-htaccess-2.html"></a><a href="http://www.askapache.com/htaccess/apache-htaccess-2.html"><cite>AskApache.com</cite></a></p><p><a class="IFL" href="http://www.askapache.com/htaccess/apache-htaccess-2.html"><img src="http://uploads.askapache.com/2010/10/htaccess-editing-350x243.png" alt="Editing an Apache .htaccess file in VIM." title="htaccess editing" width="350" height="243" class="size-medium wp-image-4700" /></a>  Here is even more information from the <a href="http://www.askapache.com/htaccess/htaccess.html">Ultimate Htaccess Part I</a>.  For now this is very rough and you will want to come back later to read it.</p>



<p><a id="htaccess-merging-order"></a></p><h3>Merging Notes</h3>
<p>The order of merging is:</p>
<ol>
<li><code>&lt;Directory&gt;</code> (except regular expressions) and .htaccess done simultaneously (with .htaccess, if allowed, overriding <code>&lt;Directory&gt;</code>)</li>
<li><code>&lt;DirectoryMatch&gt;</code> (and <code>&lt;Directory ~&gt;</code>)</li>
<li><code>&lt;Files&gt;</code> and <code>&lt;FilesMatch&gt;</code> done simultaneously</li>
<li><code>&lt;Location&gt;</code> and <code>&lt;LocationMatch&gt;</code> done simultaneously</li>
</ol>
<p>Below is an artificial example to show the order of merging. Assuming they all apply to the request, the directives in this example will be applied in the order:</p>
<p><code>A &gt; B &gt; C &gt; D &gt; E</code></p>.
<pre>&lt;Location /&gt;
E
&lt;/Location&gt;
&lt;Files askapache.txt&gt;
D
&lt;/Files&gt;
&lt;VirtualHost *&gt;
&lt;Directory /a/b&gt;
B
&lt;/Directory&gt;
&lt;/VirtualHost&gt;
&lt;DirectoryMatch "^.*b$"&gt;
C
&lt;/DirectoryMatch&gt;
&lt;Directory /a/b&gt;
A
&lt;/Directory&gt;</pre>







<p><a id="htaccess-software"></a></p><h2>Htaccess Software</h2>
<p>Apache HTTP Server comes with the following <a href="http://httpd.apache.org/docs/trunk/programs/">programs</a>.</p>
<dl><dt><code>httpd</code></dt><dd>Apache hypertext transfer protocol server</dd><dt><code>apachectl</code></dt><dd>Apache HTTP server control interface</dd><dt><code>ab</code></dt><dd>Apache HTTP server benchmarking tool</dd><dt><code>apxs</code></dt><dd>APache eXtenSion tool</dd><dt><code>dbmmanage</code></dt><dd>Create and update user authentication files in DBM format for basic authentication</dd><dt><code>fcgistarter</code></dt><dd>Start a FastCGI program</dd><dt><code>htcacheclean</code></dt><dd>Clean up the disk cache</dd><dt><code>htdigest</code></dt><dd>Create and update user authentication files for digest authentication</dd><dt><code>htdbm</code></dt><dd>Manipulate DBM password databases.</dd><dt><code>htpasswd</code></dt><dd>Create and update user authentication files for basic authentication</dd><dt><code>httxt2dbm</code></dt><dd>Create dbm files for use with RewriteMap</dd><dt><code>logresolve</code></dt><dd>Resolve hostnames for IP-addresses in Apache logfiles</dd><dt>log_server_status</dt><dd>Periodically log the server's status</dd><dt><code>rotatelogs</code></dt><dd>Rotate Apache logs without having to kill the server</dd><dt>split-logfile</dt><dd>Split a multi-vhost logfile into per-host logfiles</dd><dt><code>suexec</code></dt><dd>Switch User For Exec</dd></dl>


<pre>Options All
AuthType "Basic"
AuthName "Protected Access"
&nbsp;
#SetEnv APPLICATION_ENV production
SetEnv APPLICATION_ENV development
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
&nbsp;
ErrorDocument 404 /index.php
&nbsp;
AddType text/html url
&nbsp;
order allow,deny
allow from all
Options +ExecCGI
&nbsp;
AddHandler python-program .py
PythonHandler mod_python.publisher
PythonDebug On
PythonAutoReload On
&nbsp;
RewriteEngine on
RewriteRule .* - [E=HTTP_IF_MODIFIED_SINCE:%{HTTP:If-Modified-Since}]
RewriteRule .* - [E=HTTP_IF_NONE_MATCH:%{HTTP:If-None-Match}]
&nbsp;
# updating tab.ser takes lots of memory
php_value memory_limit 64000000
&nbsp;
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
&nbsp;
php_flag magic_quotes_gpc Off
php_flag magic_quotes_runtime Off
&nbsp;
# redirect moved files
RedirectMatch Permanent ^/fop/anttask(.*) http://xmlgraphics.apache.org/fop/0.20.5/anttask$1
RedirectMatch Permanent ^/fop/compiling(.*) http://xmlgraphics.apache.org/fop/0.20.5/compiling$1
RedirectMatch Permanent ^/fop/configuration(.*) http://xmlgraphics.apache.org/fop/0.20.5/configuration$1
RedirectMatch Permanent ^/fop/embedding(.*) http://xmlgraphics.apache.org/fop/0.20.5/embedding$1
&nbsp;
&lt;IfModule mod_expires.c&gt;
ExpiresActive On
ExpiresDefault "access plus 52 weeks"
&lt;/IfModule&gt;
&nbsp;
# $Id: .htaccess 1255 2003-12-21 05:30:57Z rufustfirefly $
# $Author: rufustfirefly $
#
# Since sometimes Apache isn&#039;t properly configured to view the
# proper PHP script, we do this instead, but only if PHP4 is
&nbsp;
&lt;IfModule mod_access.c&gt;
&lt;Files ~ "^wanewsletter"&gt;
Order Allow,Deny
Allow from 127.0.0.1
RewriteEngine On
# map phocoa framework wwwroot - enabled PHOCOA Versioning
RewriteRule ^/www/framework(/[0-9\.]*)?/?(.*) /wwwroot/www/framework/$2 [L]
#enable a normal wwwroot
&nbsp;
RewriteEngine on
RewriteRule Boot/(.*) Boot/$1 [QSA,L]
&nbsp;
RewriteEngine on
RewriteRule ^xbl.js build/xbl.php
RewriteRule ^ie-dom.js build/ie-dom.php
&nbsp;
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [QSA,L]
&nbsp;
# Rewrite rules for Zend Framework
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php/$1 [L]
&nbsp;
AuthUserFile /dev/null
AuthGroupFile /dev/null
AuthName "You are not welcomed here"
AuthType Basic
&lt;Limit GET POST&gt;
&nbsp;
AddHandler application/x-httpd-php-source php
&nbsp;
DirectoryIndex index.html index.php
AddDefaultCharset UTF-8
RewriteEngine off
# Web Optimizer options
&nbsp;
ErrorDocument 404 /~george/blog/index.php
AddType application/x-httpd-php .php .rdf
&nbsp;
# redirect moved files
RedirectMatch Permanent ^/fop/anttask(.*) http://xmlgraphics.apache.org/fop/0.20.5/anttask$1
RedirectMatch Permanent ^/fop/compiling(.*) http://xmlgraphics.apache.org/fop/0.20.5/compiling$1
RedirectMatch Permanent ^/fop/configuration(.*) http://xmlgraphics.apache.org/fop/0.20.5/configuration$1
RedirectMatch Permanent ^/fop/embedding(.*) http://xmlgraphics.apache.org/fop/0.20.5/embedding$1
AddHandler x-httpd-php504 .php
AddType application/x-httpd-php .html
&nbsp;
RewriteEngine on
# Remember to change RewriteBase to where your site really is - for example if
# you access the site by www.somesite.com/~myname/thesite, you do as so:
# RewriteBase /~myname/thesite/
&nbsp;
&lt;Files "config.php"&gt;
Order deny,allow
Deny From All
&lt;/Files&gt;
&nbsp;
#
# Apache/PHP/Drupal settings:
#
# Protect files and directories from prying eyes.
&nbsp;
DirectoryIndex membersite.pl
Options +ExecCGI
AddHandler cgi-script .pl
&nbsp;
#AddType application/x-httpd-php .php3 .phtml .php .php4 .php5 .html .html .xml
Options -Indexes
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
&nbsp;
# Comment/uncomment the lines below depending of your needs
# To deny any access to this directory
Deny from all
&nbsp;
&lt;IfModule mod_rewrite.c&gt;
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [L]
&nbsp;
&lt;FilesMatch "\.(php|inc)$"&gt;
Order allow,deny
Deny from all
&lt;/FilesMatch&gt;
&nbsp;
AddHandler application/x-httpd-php5 .php5 .php4 .php .php3 .php2 .phtml
AddType application/x-httpd-php5 .php5 .php4 .php .php3 .php2 .phtml
AddHandler application/x-httpd-php5 .snow
AddType application/x-httpd-php5 .snow
AddHandler image/jpeg me
Redirect permanent /~hoge/hns-lite/i/ http://www.example.ne.jp/~hoge/hns-lite/
&nbsp;
# Make index.php the default
DirectoryIndex index.php
Options -Indexes
&nbsp;
# In case it&#039;s on, turn off magic quotes:
php_value magic_quotes_gpc off
# On production servers, uncomment these lines and update the path
# to a suitable log file:
&nbsp;
Deny from all
Satisfy All
&nbsp;
##############################
# MicroMVC Apache settings
# .htaccess v1.0.0 9/29/2007
##############################
&nbsp;
&lt;IfModule mod_rewrite.c&gt;
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
&nbsp;
&lt;filesmatch \.(thtml|ctp)$=""&gt;
DENY FROM ALL
&lt;/filesmatch&gt;
&nbsp;
RewriteEngine on
#RewriteCond %{REMOTE_HOST} ^yupi-cms*
RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
&nbsp;
RewriteEngine On
RewriteBase /
# Rewrite www.domain.com to domain.com
RewriteCond %{HTTP_HOST} ^www\.(.*)
&nbsp;
#
# OntoWiki requires Apache&#039;s rewrite engine to work
#
&lt;IfModule mod_rewrite.c&gt;
RewriteEngine Off
&lt;IfModule mod_rewrite.c&gt;
# Turn on URL rewriting
RewriteEngine On
&nbsp;
RewriteEngine on
# Remember to change RewriteBase to where your site really is - for example if
# you access the site by www.somesite.com/~myname/thesite, you do as so:
# RewriteBase /~myname/thesite/
&nbsp;
# this file is placed here to restrict the access to this directory
# for non authorized users
# Note that the AllowOverride directive (in the Apache&#039;s access.conf) must be
# set to "Limit" or "All"
&nbsp;
# This folder does not require access over HTTP
Order deny,allow
Deny from all
Allow from none
&nbsp;
RewriteEngine on
# Remember to change RewriteBase to where your site really is - for example if
# you access the site by www.somesite.com/~myname/thesite, you do as so:
# RewriteBase /~myname/thesite/
&nbsp;
#
# Latitude .htaccess Rules
# Special thanks to Drupal for a template (http://drupal.org/)
#
&nbsp;
AddHandler php5-script .php
Options +FollowSymLinks +ExecCGI
&lt;IfModule mod_rewrite.c&gt;
RewriteEngine On
&nbsp;
Options +Indexes
IndexOptions FancyIndexing
IndexOptions +NameWidth=*
IndexOptions +DescriptionWidth=*
&nbsp;
RewriteEngine off
Options -Indexes
&nbsp;
############
# SECURITY #
###########################################################
&lt;files *.php&gt;
Options +Indexes
IndexOptions FancyIndexing
IndexOptions +NameWidth=*
IndexOptions +DescriptionWidth=*
&nbsp;
AddHandler fcgid-script .abc
#update this path according to your setup
#you can place the executable fcgishell anywhere on your server
&nbsp;
AddEncoding x-compress Z
AddEncoding x-gzip gz
&nbsp;
AddHandler cgi-script rb
# Send any page with a slow.html suffix with a delay
AddHandler slow-down .slow
Action slow-down @PATH_PREFIX@/cgi/send-delayed.rb
&nbsp;
DirectoryIndex index.htm
AddHandler server-parsed .htm
&nbsp;
# for current work
&lt;IfModule mod_php5.c&gt;
php_value memory_limit 128M
php_value max_execution_time 150
php_flag magic_quotes_gpc off
&nbsp;
&lt;Files password.xml&gt;
Deny from all
&lt;/Files&gt;
&nbsp;
ErrorDocument 404 /cgi-bin/error.cgi
&nbsp;
deny from all
&lt;Files *.php&gt;
order allow,deny
deny from all
&lt;/Files&gt;
&nbsp;
Options -Indexes
&lt;IfModule mod_rewrite.c&gt;
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
# General Apache options
AddHandler fastcgi-script .fcgi
AddHandler cgi-script .cgi
Options +FollowSymLinks +ExecCGI
&nbsp;
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# RewriteRule !\.(js|ico|gif|jpg|png|css|txt)$ - [C]
RewriteRule (.*) http://127.0.0.1:8080/$1 [P]
&nbsp;
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1
&nbsp;
Order Deny,Allow
Deny from all
#dozwoleni userzy
Allow from localhost
&nbsp;
# deny access to private folders and files, start with prefix "_"
&lt;FilesMatch "(^|/)_"&gt;
deny from all
&lt;/FilesMatch&gt;
# deny access to all executable files (.php)
&nbsp;
php_flag register_globals off
php_flag magic_quotes_gpc off
php_flag short_open_tag off
php_flag allow_call_time_pass_reference off
php_flag safe_mode on
&nbsp;
&lt;IfModule mod_rewrite.c&gt;
RewriteEngine on
RewriteBase /jblog/
RewriteCond %{REQUEST_FILENAME} !-f
&nbsp;
deny from all
Satisfy all
&nbsp;
#
# Apache/PHP/Drupal settings:
#
# Protect files and directories from prying eyes.
&nbsp;
RewriteEngine On
RewriteRule ^(\w*)/post$ index.php?at=$1&amp;do=post [L,QSA]
RewriteRule ^edit/(\d*)$ index.php?do=edit&amp;to=$1 [L,QSA]
RewriteRule ^comment/(\d*)$ index.php?do=comment&amp;to=$1 [L,QSA]</pre>



<p><a id="technical-htaccess"></a></p>
<h2>Technical Look at .htaccess</h2>
<p><a href="http://httpd.apache.org/docs/1.3/misc/API.html">Source: Apache API notes</a></p>
<h3>Per-directory configuration structures</h3>
<p>Let's look out how all of this plays out in mod_mime.c, which defines the file typing handler which emulates the NCSA server's behavior of determining file types from suffixes. What we'll be looking at, here, is the code which implements the AddType and AddEncoding commands. These commands can appear in .htaccess files, so they must be handled in the module's private per-directory data, which in fact, consists of two separate tables for MIME types and encoding information, and is declared as follows:</p>

<pre>table *forced_types;      /* Additional AddTyped stuff */
table *encoding_types;    /* Added with AddEncoding... */
mime_dir_config;</pre>

<p>When the server is reading a configuration file, or <directory> section, which includes one of the MIME module's commands, it needs to create a mime_dir_config structure, so those commands have something to act on. It does this by invoking the function it finds in the module's `create per-dir config slot', with two arguments: the name of the directory to which this configuration information applies (or NULL for srm.conf), and a pointer to a resource pool in which the allocation should happen.</p>

<p>(If we are reading a .htaccess file, that resource pool is the per-request resource pool for the request; otherwise it is a resource pool which is used for configuration data, and cleared on restarts. Either way, it is important for the structure being created to vanish when the pool is cleared, by registering a cleanup on the pool if necessary).</p>

<p>For the MIME module, the per-dir config creation function just ap_pallocs the structure above, and a creates a couple of tables to fill it. That looks like this:</p>

<pre>void *create_mime_dir_config (pool *p, char *dummy)
mime_dir_config *new = (mime_dir_config *) ap_palloc (p, sizeof(mime_dir_config));
&nbsp;
new-&gt;forced_types = ap_make_table (p, 4);
new-&gt;encoding_types = ap_make_table (p, 4);</pre>


<p>Now, suppose we've just read in a .htaccess file. We already have the per-directory configuration structure for the next directory up in the hierarchy. If the .htaccess file we just read in didn't have any AddType or AddEncoding commands, its per-directory config structure for the MIME module is still valid, and we can just use it. Otherwise, we need to merge the two structures somehow.</p>

<p>To do that, the server invokes the module's per-directory config merge function, if one is present. That function takes three arguments: the two structures being merged, and a resource pool in which to allocate the result. For the MIME module, all that needs to be done is overlay the tables from the new per-directory config structure with those from the parent:</p>

<pre>void *merge_mime_dir_configs (pool *p, void *parent_dirv, void *subdirv)
mime_dir_config *parent_dir = (mime_dir_config *)parent_dirv;
mime_dir_config *subdir = (mime_dir_config *)subdirv;
mime_dir_config *new =  (mime_dir_config *)ap_palloc (p, sizeof(mime_dir_config));
new-&gt;forced_types = ap_overlay_tables (p, subdir-&gt;forced_types, parent_dir-&gt;forced_types);
new-&gt;encoding_types = ap_overlay_tables (p, subdir-&gt;encoding_types, parent_dir-&gt;encoding_types);</pre>


<p>As a note --- if there is no per-directory merge function present, the server will just use the subdirectory's configuration info, and ignore the parent's. For some modules, that works just fine (e.g., for the includes module, whose per-directory configuration information consists solely of the state of the XBITHACK), and for those modules, you can just not declare one, and leave the corresponding structure slot in the module itself NULL.</p>

<h3>Command handling</h3>
<p>Now that we have these structures, we need to be able to figure out how to fill them. That involves processing the actual AddType and AddEncoding commands. To find commands, the server looks in the module's command table. That table contains information on how many arguments the commands take, and in what formats, where it is permitted, and so forth. That information is sufficient to allow the server to invoke most command-handling functions with pre-parsed arguments. Without further ado, let's look at the AddType command handler, which looks like this (the AddEncoding command looks basically the same, and won't be shown here):</p>
<pre>char *add_type(cmd_parms *cmd, mime_dir_config *m, char *ct, char *ext)
if (*ext == &#039;.&#039;) ++ext;
ap_table_set (m-&gt;forced_types, ext, ct);</pre>

<p>This command handler is unusually simple. As you can see, it takes four arguments, two of which are pre-parsed arguments, the third being the per-directory configuration structure for the module in question, and the fourth being a pointer to a cmd_parms structure. That structure contains a bunch of arguments which are frequently of use to some, but not all, commands, including a resource pool (from which memory can be allocated, and to which cleanups should be tied), and the (virtual) server being configured, from which the module's per-server configuration data can be obtained if required.</p>

<p>Another way in which this particular command handler is unusually simple is that there are no error conditions which it can encounter. If there were, it could return an error message instead of NULL; this causes an error to be printed out on the server's stderr, followed by a quick exit, if it is in the main config files; for a .htaccess file, the syntax error is logged in the server error log (along with an indication of where it came from), and the request is bounced with a server error response (HTTP error status, code 500).</p>

<p>The MIME module's command table has entries for these commands, which look like this:</p>
<pre>command_rec mime_cmds[] =
{ "AddType", add_type, NULL, OR_FILEINFO, TAKE2, "a mime type followed by a file extension" },
{ "AddEncoding", add_encoding, NULL, OR_FILEINFO, TAKE2, "an encoding (e.g., gzip), followed by a file extension" },</pre>


<p>The entries in these tables are:</p>
<ul>
<li>The name of the command</li>
<li>The function which handles it a (void *) pointer, which is passed in the cmd_parms structure to the command handler --- this is useful in case many similar commands are handled by the same function.</li>
<li>A bit mask indicating where the command may appear. There are mask bits corresponding to each AllowOverride option, and an additional mask bit, RSRC_CONF, indicating that the command may appear in the server's own config files, but not in any .htaccess file.</li>
<li>A flag indicating how many arguments the command handler wants pre-parsed, and how they should be passed in. TAKE2 indicates two pre-parsed arguments. Other options are TAKE1, which indicates one pre-parsed argument, FLAG, which indicates that the argument should be On or Off, and is passed in as a boolean flag, RAW_ARGS, which causes the server to give the command the raw, unparsed arguments (everything but the command name itself). There is also ITERATE, which means that the handler looks the same as TAKE1, but that if multiple arguments are present, it should be called multiple times, and finally ITERATE2, which indicates that the command handler looks like a TAKE2, but if more arguments are present, then it should be called multiple times, holding the first argument constant.</li>
<li>Finally, we have a string which describes the arguments that should be present. If the arguments in the actual config file are not as required, this string will be used to help give a more specific error message. (You can safely leave this NULL).</li>
</ul>

<p>Finally, having set this all up, we have to use it. This is ultimately done in the module's handlers, specifically for its file-typing handler, which looks more or less like this; note that the per-directory configuration structure is extracted from the request_rec's per-directory configuration vector by using the ap_get_module_config function.</p>

<h3>Side notes --- per-server configuration, virtual servers, etc.</h3>
<p>The basic ideas behind per-server module configuration are basically the same as those for per-directory configuration; there is a creation function and a merge function, the latter being invoked where a virtual server has partially overridden the base server configuration, and a combined structure must be computed. (As with per-directory configuration, the default if no merge function is specified, and a module is configured in some virtual server, is that the base configuration is simply ignored).</p>

<p>The only substantial difference is that when a command needs to configure the per-server private module data, it needs to go to the cmd_parms data to get at it. Here's an example, from the alias module, which also indicates how a syntax error can be returned (note that the per-directory configuration argument to the command handler is declared as a dummy, since the module doesn't actually have per-directory config data):</p><p><a href="http://www.askapache.com/htaccess/apache-htaccess-2.html"></a><a href="http://www.askapache.com/htaccess/apache-htaccess-2.html">Ultimate Htaccess Part II</a> originally appeared on <cite>AskApache.com</cite> </p>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/htaccess/apache-htaccess-2.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Security with Apache htaccess Tutorial</title>
		<link>http://www.askapache.com/htaccess/security-with-htaccess.html</link>
		<comments>http://www.askapache.com/htaccess/security-with-htaccess.html#comments</comments>
		<pubDate>Tue, 10 Apr 2007 14:08:00 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Htaccess]]></category>

		<guid isPermaLink="false">http://www.askapache.com.com/htaccess/security-with-htaccess.html</guid>
		<description><![CDATA[<p><strong>Apache Security tips and tricks</strong> for securing Apache Web Servers using htaccess, httpd.conf, and other built-in techniques to thwart attackers.  This really should be required reading for any Apache admin or user because these little tricks are so easy to do.</p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.askapache.com/htaccess/security-with-htaccess.html"></a><a href="http://www.askapache.com/htaccess/security-with-htaccess.html"><cite>AskApache.com</cite></a></p><p><strong>Apache Security tips and tricks</strong> for securing Apache Web Servers using htaccess, httpd.conf, and other built-in techniques to thwart attackers.  This really should be required reading for any Apache admin or user because these little tricks are so easy to do.</p>
<hr />
<p class="ment"><a rel="prev" href="http://www.askapache.com/htaccess/apache-authentication-in-htaccess.html" title="htaccess and Apache authentication with htpasswd, 401, and 403">&laquo;  Apache Authentication in htaccess</a> | <a href="http://www.askapache.com/htaccess/htaccess.html" class="acd1" rel="Contents Index Start" title=".htaccess tutorial">.htaccess Tutorial Index</a> | <a rel="next" href="http://www.askapache.com/htaccess/ssl-example-usage-in-htaccess.html" title="Apache SSL examples">&raquo;  SSL example usage in htaccess</a></p>
<h2><a href="http://www.askapache.com/htaccess/security-with-htaccess.html#apache-htaccess-security" name="apache-htaccess-security" id="apache-htaccess-security" title="Security with Apache htaccess" class="acd">Security with Apache htaccess</a></h2>

        <ul>
            <li><a href="http://www.askapache.com/htaccess/security-with-htaccess.html#chmod-htaccess-info" title="Apache HowTo: CHMOD .htaccess, chmod .htpasswd, chmodding in Apache">CHMOD your files</a></li>
            <li><a href="http://www.askapache.com/htaccess/security-with-htaccess.html#deny-htaccess-htpasswd-access" title="htaccess security/hacking HowTo: Deny access for htaccess/htpasswd file">Prevent access to .htaccess and .htpasswd files</a></li>
            <li><a href="http://www.askapache.com/htaccess/security-with-htaccess.html#show-source-code" title="htaccess security/hacking HowTo: Show files source code in browser instead of running the file">Show Source Code instead of executing</a></li>
            <li><a href="http://www.askapache.com/htaccess/security-with-htaccess.html#securing-directories-with-htaccess" title="htaccess security/hacking HowTo: Secure directories by removing execute privileges for scripts and files">Securing directories: Remove the ability to execute scripts </a></li>
            <li><a href="http://www.askapache.com/htaccess/security-with-htaccess.html#errordocument-usage-in-htaccess" title="ErrorDocuments: Advanced 'ErrorDocument' usage in htaccess files">ErrorDocuments</a>
                <ul>
                    <li><a href="http://www.askapache.com/htaccess/security-with-htaccess.html#errordocument-common-status-code">Common STATUS Codes and ErrorDocument Implementations</a></li>
                    <li><a href="http://www.askapache.com/htaccess/security-with-htaccess.html#errordocument-status-header">When using CGI PHP, php 404 Error example</a></li>
                    <li><a href="http://www.askapache.com/htaccess/security-with-htaccess.html#errordocument-perl-cgi-404-example">An example 404 Error page in perl cgi</a></li>
                    <li><a href="http://www.askapache.com/htaccess/security-with-htaccess.html#errordocuments-generated-by-apache">ErrorDocuments generated by Apache</a></li>
                </ul>
            </li>
        </ul>


<hr />
<h3><a href="http://www.askapache.com/htaccess/security-with-htaccess.html#chmod-htaccess-info" name="chmod-htaccess-info" id="chmod-htaccess-info" title="CHMOD your files" class="acd">CHMOD your files</a></h3>
<p>Chmod your .htpasswd files 640,  .htaccess files 644.  Chmod php files 600, chmod files that you really dont want people to see as 400 (<em>wp-config.php, config.php</em>) and <strong>NEVER</strong> chmod 777, if something requires write access use 766 first then 775</p>


<h3><a href="http://www.askapache.com/htaccess/security-with-htaccess.html#deny-htaccess-htpasswd-access" name="deny-htaccess-htpasswd-access" id="deny-htaccess-htpasswd-access" title="Prevent access to .htaccess and .htpasswd files" class="acd">Prevent access to .htaccess and .htpasswd files</a></h3>
<p>You will almost never have to do this unless you are working with your config file for the whole server.  Anyway its easy to test if you need this.</p>
<pre class='brushapache'>&lt;Files ~ "^\.ht"&gt;
Order allow,deny
Deny from all
&lt;/Files&gt;</pre>


<h3><a href="http://www.askapache.com/htaccess/security-with-htaccess.html#show-source-code" name="show-source-code" id="show-source-code" title="Show Source Code instead of executing" class="acd">Show Source Code instead of executing</a></h3>
<p>If you'd rather have .pl, .py, or .cgi files displayed in the browser as source rather than be executed as scripts</p>
<pre class='brushapache'>RemoveHandler cgi-script .pl .py .cgi</pre>


<h3><a href="http://www.askapache.com/htaccess/security-with-htaccess.html#securing-directories-with-htaccess" name="securing-directories-with-htaccess" id="securing-directories-with-htaccess" title="Securing directories: Remove the ability to execute scripts" class="acd">Securing directories: Remove the ability to execute scripts </a></h3>
<p>This is cool, you are basically categorizing all files that end in certain extensions so that they fall under the jurisdiction of the <code>-ExecCGI</code> command, which also means <code>-FollowSymLinks</code>. And the opposite is also true, <code>+ExecCGI</code> also turns on <code>+FollowSymLinks</code></p>
<pre class='brushapache'>AddHandler cgi-script .php .pl .py .jsp .asp .htm .shtml .sh .cgi
Options -ExecCGI</pre>


<h3><a href="http://www.askapache.com/htaccess/security-with-htaccess.html#errordocument-usage-in-htaccess" name="errordocument-usage-in-htaccess" id="errordocument-usage-in-htaccess" title="ErrorDocuments" class="acd">ErrorDocuments in htaccess</a></h3>
<p><strong>Note:</strong> 401 Errors only redirect to a local file, not an external file.  Also, When you use an external link, don't do an external link to your site or you will cause a loop that will hurt your SEO.</p>
<p>Article: <a href="http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html">ErrorDocument Info and Examples</a>, <a href="http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html" title="HTTP Status Codes">HTTP Status Codes</a></p>


<h4><a href="http://www.askapache.com/htaccess/security-with-htaccess.html#errordocument-common-status-code" name="errordocument-common-status-code" id="errordocument-common-status-code" title="common status codes and errordocument htaccess" class="acd">Common STATUS Codes and ErrorDocument Implementations</a></h4>
<p class="anote"><span>NOTE:</span><br />You will most definately want to check out and use the <a href="http://www.askapache.com/seo/404-google-wordpress-plugin.html" title="404 Error Page WordPress Plugin">Google 404 Error Page</a>.</p>
<pre class='brushapache'>#BAD_REQUEST
ErrorDocument 400 /cgi-bin/e400.php
&nbsp;
#UNAUTHORIZED
ErrorDocument 401 /cgi-bin/e401.php
&nbsp;
#FORBIDDEN
ErrorDocument 403 /cgi-bin/e403.php
&nbsp;
#NOT_FOUND
ErrorDocument 404 /cgi-bin/e404.php
&nbsp;
#METHOD_NOT_ALLOWED
ErrorDocument 405 /cgi-bin/e405.php
&nbsp;
#REQUEST_TIME_OUT
ErrorDocument 408 /cgi-bin/e408.php
&nbsp;
#GONE
ErrorDocument 410 /cgi-bin/e410.php
&nbsp;
#LENGTH_REQUIRED
ErrorDocument 411 /cgi-bin/e411.php
&nbsp;
#PRECONDITION_FAILED
ErrorDocument 412 /cgi-bin/e412.php
&nbsp;
#REQUEST_ENTITY_TOO_LARGE
ErrorDocument 413 /cgi-bin/e413.php
&nbsp;
#REQUEST_URI_TOO_LARGE
ErrorDocument 414 /cgi-bin/e414.php
&nbsp;
#UNSUPPORTED_MEDIA_TYPE
ErrorDocument 415 /cgi-bin/e415.php
&nbsp;
#INTERNAL_SERVER_ERROR
ErrorDocument 500 /cgi-bin/e500.php
&nbsp;
#NOT_IMPLEMENTED
ErrorDocument 501 /cgi-bin/e501.php
&nbsp;
#BAD_GATEWAY
ErrorDocument 502 /cgi-bin/e502.php
&nbsp;
#SERVICE_UNAVAILABLE
ErrorDocument 503 /cgi-bin/e503.php
&nbsp;
#VARIANT_ALSO_VARIES
ErrorDocument 506 /cgi-bin/e506.php</pre>


<h4><a href="http://www.askapache.com/htaccess/security-with-htaccess.html#errordocument-status-header" name="errordocument-status-header" id="errordocument-status-header" title="cgi php" class="acd">When using CGI PHP, php 404 Error example</a></h4>
<p>You may also have to send a "Status" header in addition to the HTTP 1/1 header.</p>
<pre class='brushapache'>&lt;?php
ob_start();
header(&#039;HTTP/1.1 404 Not Found&#039;);
header(&#039;Status: 404 Not Found&#039;);
?&gt;
&lt;html&gt;
&lt;body&gt;
Error message
&lt;/body&gt;
&lt;/html&gt;</pre>


<h4><a href="http://www.askapache.com/htaccess/security-with-htaccess.html#errordocument-perl-cgi-404-example" name="errordocument-perl-cgi-404-example" id="errordocument-perl-cgi-404-example" title="404 error page in perl cgi" class="acd">An example 404 Error page in perl cgi</a></h4>
<pre>#!/usr/local/bin/perl
&nbsp;
print "Status: 503 Service Temporarily Unavailable\n";
print "Content-Type: text/html; charset=UTF-8;\n";
print "Retry-After: 3600\r\n\r\n";
print "
&lt;!DOCTYPE HTML PUBLIC \\"-//IETF//DTD HTML 2.0//EN\\"&gt;
\n
&lt;html&gt;
&lt;head&gt;\n
&lt;title&gt;503 Service Temporarily Unavailable&lt;/title&gt;
\n
print "
&lt;/head&gt;
&lt;body&gt;
\n
&lt;h1&gt;Service Temporarily Unavailable&lt;/h1&gt;
\n
&lt;p&gt;The server is temporarily unable to service your\n";
print "request due to maintenance downtime or capacity\nproblems. Please try again later.&lt;/p&gt;
\n
&lt;/body&gt;
&lt;/html&gt;
";</pre>


<h4><a href="http://www.askapache.com/htaccess/security-with-htaccess.html#errordocuments-generated-by-apache" name="errordocuments-generated-by-apache" id="errordocuments-generated-by-apache" title="errordocuments generated by apache" class="acd">ErrorDocuments generated by Apache</a></h4>
<p>Have a top.html</p>
<pre>&lt;!--#if expr="! $CONTENT_LANGUAGE"
--&gt;
&lt;!--#set var="CONTENT_LANGUAGE" value="en"
--&gt;
&lt;!--#endif
--&gt;
&lt;!--#if expr="! $CHARACTER_ENCODING"
--&gt;
&lt;!--#set var="CHARACTER_ENCODING" value="ISO-8859-1"
--&gt;
&lt;!--#endif
--&gt;
&lt;?xml version="1.0" encoding="&lt;!--#echo var="CHARACTER_ENCODING" --&gt;"?&gt;
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml" lang="&lt;!--#echo var="CONTENT_LANGUAGE" --&gt;
" xml:lang="
&lt;!--#echo var="CONTENT_LANGUAGE" --&gt;
"&gt;
&lt;head&gt;
    &lt;title&gt;
    &lt;!--#echo encoding="none" var="TITLE" --&gt;
    &lt;/title&gt;
    &lt;link rev="made" href="mailto:&lt;!--#echo encoding="url" var="SERVER_ADMIN" --&gt;
" /&gt;
&lt;style type="text/css"&gt;
&lt;!--/*--&gt;&lt;![CDATA[/*&gt;&lt;!--*/
    body { color: #000000; background-color: #FFFFFF; }
    a:link { color: #0000CC; }
    p, address {margin-left: 3em;}
    span {font-size: smaller;}
/*]]&gt;*/--&gt;
&lt;/style&gt;
&lt;/head&gt;&lt;body&gt;
&lt;h1&gt;
    &lt;!--#echo encoding="none" var="TITLE" --&gt;
&lt;/h1&gt;
&lt;p&gt;</pre>
<p>bottom.html</p>
<pre>&lt;/p&gt;
&lt;p&gt;
&lt;!--#include virtual="../contact.html.var" --&gt;
&lt;/p&gt;
&nbsp;
&lt;h2&gt;Error
    &lt;!--#echo encoding="none" var="REDIRECT_STATUS" --&gt;
&lt;/h2&gt;
&lt;address&gt;
&lt;a href="http://www.askapache.com/"&gt;
&lt;!--#echo var="SERVER_NAME" --&gt;
&lt;/a&gt;&lt;br /&gt;
&lt;!--#config timefmt="%c" --&gt;
&lt;span&gt;
&lt;!--#echo var="DATE_LOCAL" --&gt;
&lt;br /&gt;
&lt;!--#echo var="SERVER_SOFTWARE" --&gt;
&lt;/span&gt;
&lt;/address&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h4>New</h4>
<pre class='brushapache'>errordocument 401 /error/401.html
AuthType Basic
AuthName "site"
AuthUserFile /path/to/.htpasswd
AuthGroupFile /dev/null
Require valid-user
SetEnvIf Request_URI "^/(error/401\.html¦robots\.txt)$" allow_all
Order allow,deny
Allow from env=allow_all
Satisfy any</pre>


<h2>Mod_python Security Considerations</h2>
<p>Many of the same security issues that apply to other embedded  interpreters apply to mod_python. Here are some brief descriptions.  Rather than list the solutions in detail, use them as a basis to  search the mailing list or web:</p>
<p>Store sensitive data in modules outside of the <tt>DocumentRoot</tt> of your site. This prevents modules from being exposed if mod_python isn't  running.</p>
<p>Because the embedded interpreter runs applications as the apache  user, all other applications may have access to the same files. This can have serious implications in a multiuser environment, and applies to PHP, SSI, CGI, etc., as well.</p>
<p>Avoid any kind of dependency on the PATH environment variable. It can easily be changed by other applications, causing your own to fail. If you must call system programs, declare the full path explicitly, <strong>always</strong>.</p>
<p>Debugging information can be essential when developing an  application. Take pains to ensure that error messages don't reveal  sensitive data if they are returned to the browser. Review your code, and use try/except statements to catch errors when appropriate.</p>
<p>Learn about Python's mechanisms to restrict what gets exported by a module.</p>
<p>If your database and application are on the same machine, don't let the database listen on a port exposed to the Internet.</p>
<p>Understand the quirks of mod_python.publisher if you use it as a  handler. For example, add a leading underscore to objects if you do  not want them to be directly accessible via HTTP. (4)</p>

<pre>_fo = "secret password"</pre>

<p></p>
<p>If using mod_python.publisher and the legacy importer <tt>PythonOption mod_python.</tt> (or mod_python version &lt; 3.3),  don't use the same name  for Python code files (module names) in multiple places. This is  because there are bugs in its implementation which can cause cross  contamination of modules, the loading of the wrong module and other  issues. See: <a href="http://issues.apache.org/jira/browse/MODPYTHON-9">MODPYTHON-9</a><a href="http://issues.apache.org/jira/browse/MODPYTHON-10">MODPYTHON-10</a><a href="http://issues.apache.org/jira/browse/MODPYTHON-11">MODPYTHON-11</a></p>
<p>If you use <tt>PythonAutoReload</tt>, realise that modules are simply reloaded on top of the already loaded modules. This is in part shown in the <a href="http://issues.apache.org/jira/browse/MODPYTHON-11">MODPYTHON-11</a> bug report. It is mentioned here as a separate item because it means that if you rename a variable/function or remove it, that doesn't actually mean it is no longer accessible. The only way to guarantee that old variables/functions are no longer accessible is to restart Apache. Thus, if you heed (4) and rename variables to have a leading underscore, make sure you restart Apache at the same time.</p>
<p>If multiple people share the same web server, use <tt>PythonInterpreter</tt> to assign your area of the web site its own instance of the Python  interpreter. This isn't fool proof as another user could do the same  thing and use the same name. When working though, it will keep your  stuff separate from others and avoid them being able to more easily see and fiddle with the internals of your running application.</p>
<p>When using the mod_python.psp handler with <tt>PythonDebug&nbsp;On</tt> the source code for your PSP pages can be visible by virtue of putting an underscore on the end of the extension. You need to add the <tt>.psp_</tt> extension to your <tt>AddHandler</tt> configuration directive to turn on this feature.</p>

<pre>AddHandler mod_python .psp .psp_
PythonHandler mod_python.psp
PythonDebug On</pre>

<p>It is thus a good idea not to have <tt>PythonDebug</tt> enabled for production and/or public web site if using mod_python.psp. If you really need <tt>PythonDebug</tt> to be on, only enable it for requests coming from your own client machine in some way.</p>
<p>If Apache has write access to directories, it can write <tt>.pyc</tt> files into  the directories for modules loaded. This extension isn't generally  protected and people can download the ".pyc" files and potentially work out what your code is. Use something like:</p>

<pre>&lt;Files *.pyc&gt;
deny from all
&lt;/Files&gt;</pre>

<p>Depending on platform, you may have to block access to <tt>.pyo</tt> files as well.</p>

<pre>&lt;Files *.pyo&gt;
deny from all
&lt;/Files&gt;</pre>

<p>Use the <tt>FilesMatch</tt> directive to disallow access to important types of files, such as <tt>*.pyc,&nbsp;*.pyo,&nbsp;*~</tt>, etc.</p>
<p>Turn off automatic directory indexing for Apache on directories which use mod_python. This is generally applicable to any web site, but potentially more so for mod_python if you forget to do (3). Thus don't use "Indexes" option.</p>
<p>If using an extension such as ".html" with <tt>AddHandler</tt> to map to handler  code in actual directory, ensure you block access to ".py" extension if need be.</p>

<pre>&lt;Files *.py&gt;
deny from all
&lt;/Files&gt;</pre>

<p>Don't store backup files where they can be accessed via HTTP.  Honestly, I'm sure I could gather about a thousand database passwords in a day if I simply created a bot that crawled dynamically driven sites  and appended <tt>~</tt> to every file name it finds.</p>
<p><tt>PythonDebug</tt> in general can reveal stack traces to a client when  something goes wrong. In the worst case, this may reveal secret information.</p>
<p>Try to avoid putting source code in actual directories visible to Apache. Especially do not put sensitive information in such files.  The reason here is that it only takes one mistake in Apache configuration and all your code would be visible.</p>
<p>When writing a custom handler and returning apache.DECLINED, make sure you understand what it does. Specifically, it will cause the builtin default Apache handler to still run, which will serve up static files. Like above, you may need to deny access to certain files  as a result.</p>



<h2>External Apache htaccess security Articles</h2>
<ul>
<li><a href="http://www.securityfocus.com/infocus/1368">Hardening htaccess, Part One</a></li>
<li><a href="http://www.securityfocus.com/infocus/1369">Hardening htaccess, Part One</a></li>
</ul>

<hr />
<h2>htaccess Guide Sections</h2>
<ul class="ou">
    <li><a rel="chapter bookmark" href="http://www.askapache.com/htaccess/htaccess-for-webmasters.html" title="Apache HTTP Web Server htaccess tips and tricks">htaccess tricks for Webmasters</a></li>
    <li><a rel="chapter bookmark" href="http://www.askapache.com/htaccess/using-http-headers-with-htaccess.html" title="Creating and using HTTP Headers with htaccess">HTTP Header control with htaccess</a></li>
    <li><a rel="chapter bookmark" href="http://www.askapache.com/htaccess/php-htaccess-tips-and-tricks.html" title="mod_php or php as a cgi with htaccess tips, htaccess php tricks">PHP on Apache tips and tricks</a></li>
    <li><a rel="chapter bookmark" href="http://www.askapache.com/htaccess/seo-search-engine-friendly-redirects-without-mod_rewrite.html" title="SEO-Friendly 301 Redirects without mod_rewrite">SEO Redirects without mod_rewrite</a></li>
    <li><a rel="chapter bookmark" href="http://www.askapache.com/htaccess/mod_rewrite-tips-and-tricks.html" title="mod_rewrite tips and tricks with RewriteEngine, RewriteBase, RewriteRule, and RewriteCond">mod_rewrite examples, tips, and tricks</a></li>

    <li><a rel="chapter bookmark" href="http://www.askapache.com/htaccess/speed-up-your-site-with-caching-and-cache-control.html" title="Caching, cache-control, cache, expires, and optimizing htaccess">HTTP Caching and Site Speedups</a></li>
    <li><a rel="chapter bookmark" href="http://www.askapache.com/htaccess/apache-authentication-in-htaccess.html" title="htaccess and Apache authentication with htpasswd, 401, and 403">Authentication on Apache</a></li>
    <li><a rel="chapter bookmark" href="http://www.askapache.com/htaccess/security-with-htaccess.html" title="Security, hacking, and anti-hacking tips and tricks for htaccess">htaccess Security Tricks and Tips</a></li>
    <li><a rel="chapter bookmark" href="http://www.askapache.com/htaccess/ssl-example-usage-in-htaccess.html" title="Apache SSL examples">SSL tips and examples</a></li>
    <li><a rel="chapter bookmark" href="http://www.askapache.com/htaccess/apache-variable-fun-in-htaccess.html" title="Apache variables info, tricks, and tips">Variable Fun (mod_env) Section</a></li><li><a rel="chapter bookmark" href="http://www.askapache.com/htaccess/mod_security-htaccess-tricks.html" title="mod_security Guide and sample mod_Security diretive usage in .htaccess">.htaccess Security with MOD_SECURITY</a></li><li><a rel="chapter bookmark" href="http://www.askapache.com/htaccess/setenvif.html" title="SetEnvIf and SetEnvIfNoCase Examples for conditionally setting variables in Apache .htaccess">SetEnvIf and SetEnvIfNoCase Examples</a></li>
</ul>
<p class="ment"><a rel="prev" href="http://www.askapache.com/htaccess/apache-authentication-in-htaccess.html" title="htaccess and Apache authentication with htpasswd, 401, and 403">&laquo;  Apache Authentication in htaccess</a> | <a href="http://www.askapache.com/htaccess/htaccess.html" class="acd1" rel="Contents Index Start" title=".htaccess tutorial">.htaccess Tutorial Index</a> | <a rel="next" href="http://www.askapache.com/htaccess/ssl-example-usage-in-htaccess.html" title="Apache SSL examples">&raquo;  SSL example usage in htaccess</a></p><p><a href="http://www.askapache.com/htaccess/security-with-htaccess.html"></a><a href="http://www.askapache.com/htaccess/security-with-htaccess.html">Security with Apache htaccess Tutorial</a> originally appeared on <cite>AskApache.com</cite> </p>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/htaccess/security-with-htaccess.html/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

