<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<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/"
	>

<channel>
	<title>htaccess &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://wordpress.com/tag/htaccess/</link>
	<description>Feed of posts on WordPress.com tagged "htaccess"</description>
	<pubDate>Fri, 05 Sep 2008 15:50:57 +0000</pubDate>

	<generator>http://wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Hotlinking questo sconosciuto]]></title>
<link>http://sandsblog.wordpress.com/?p=115</link>
<pubDate>Fri, 29 Aug 2008 15:27:57 +0000</pubDate>
<dc:creator>Sand</dc:creator>
<guid>http://sandsblog.wordpress.com/?p=115</guid>
<description><![CDATA[
Forse non a tutti i web surfer è noto il termine hotlinking, conosciuto anche come deep linking o ]]></description>
<content:encoded><![CDATA[<p><a href="http://sandsblog.files.wordpress.com/2008/08/link.jpg"><img class="alignright size-full wp-image-120" src="http://sandsblog.wordpress.com/files/2008/08/link.jpg" alt="" width="260" height="180" /></a></p>
<p>Forse non a tutti i web surfer è noto il termine <em><strong>hotlinking</strong></em>, conosciuto anche come <em><strong>deep linking</strong></em> o <em><strong>inline linking</strong></em>. In parole povere è la pratica, ormai largamente diffusa, di inserire un contenuto (immagini soprattutto) sul proprio sito/blog facendo riferimento al file hostato su un dato server, ovvero linkando in modo diretto il file in questione e consumando così la banda del server ospitante il file.</p>
<p>Tale "tecnica", se vogliamo chiamarla così, diventa dannosa quando vi è un grande afflusso di accessi a quel file o alla pagina in cui viene visualizzato tale file.<br />
In genere l'hotlinking avviene per pigrizia o per una mentalità di condivisione globalizzata; fatto sta che taluni si vedono succhiare la banda e magari non ne capiscono il motivo. Una soluzione sarebbe prendere il contenuto voluto e riupparlo su un altro server, a seconda della tipologia del file (image hosting, file hosting ecc.) . Certo, anche nei miei post sarà capitata un'immagine hotlinkata sebbene generalmente cerchi sempre di uppare i miei contenuti su Imageshack (immagini) o direttamente su Wordpress.</p>
<p>Ma volendo, è possibile bloccare gli hotlinker. Tuttavia devo precisare che per riuscire in questo intento è necessario l'utilizzo di un <strong>server Apache</strong> (per esempio chi crea un sito su Altervista è già a posto).</p>
<p>Procedendo, dovete editare (o creare talore non fosse presente) il file <strong><span style="color:#00ccff;">.htaccess</span></strong> presente nella root del vostro sito aggiungendo queste righe:</p>
<pre>RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(www\.)?<span style="color:#ff0000;">vostrosito\.com</span>/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule \.(jpe?g&#124;gif&#124;bmp&#124;png)$ <span style="color:#ff0000;">images/stophotlink.jpg</span> [L]</pre>
<p>Ora non vi resta che sostituire a <strong><span style="color:#ff0000;">vostrosito\.com</span></strong> l'indirizzo del vostro spazio web e a <strong><span style="color:#ff0000;">images/stophotlink.jpg</span></strong> l'indirizzo dell'immagine che apparirà al posto dell'immagine che ha subito l'hotlinking.<br />
Se pensate di poter far danni modificando il file fatene una copia di backup.</p>
<p>Operando in questo modo l'immagine hotlinkata non verrà più visualizzata sul sito che ne fa uso.</p>
<p>Alla prossima<br />
Some references to: <a href="http://giovy.it/" target="_blank">Giovy.it</a></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Redirect iPhones to a separate web site/page with .htaccess]]></title>
<link>http://briancray.wordpress.com/?p=31</link>
<pubDate>Tue, 19 Aug 2008 15:51:55 +0000</pubDate>
<dc:creator>Brian Cray</dc:creator>
<guid>http://briancray.wordpress.com/?p=31</guid>
<description><![CDATA[Instead of using a programming language (such as PHP) to redirect your iPhone requests, use .htacces]]></description>
<content:encoded><![CDATA[<p>Instead of using a programming language (such as PHP) to redirect your iPhone requests, use .htaccess to save load time and search engine problems.</p>
<p>Note: You will need some knowledge of Apache's rewriting engine to implement, including an .htaccess file with <code>RewriteEngine On</code>.</p>
<h3>Redirect root requests (excludes internal pages) to an iPhone page</h3>
<p>
<pre>
RewriteCond  %{HTTP_USER_AGENT} ^.+iPhone
RewriteCond  %{REQUEST_FILENAME} !.*iphone.html
RewriteRule  ^$ /iphone.html [L,R=301]
</pre>
</p>
<h3>Redirect all requests (includes internal pages) to an iPhone page</h3>
<p>
<pre>
RewriteCond  %{HTTP_USER_AGENT} ^.+iPhone
RewriteCond  %{REQUEST_FILENAME} !.*iphone.html
RewriteRule  ^.*$ /iphone.html [L,R=301]
</pre>
</p>
<h3>Redirect all requests from a directory to an iPhone page</h3>
<p>
<pre>
RewriteCond  %{HTTP_USER_AGENT} ^.+iPhone
RewriteCond  %{REQUEST_FILENAME} !.*iphone.html
RewriteRule  ^/directory/?(.+)?$ /iphone.html [L,R=301]
</pre>
</p>
<h3>Redirect all requests to a corresponding file in an iPhone directory</h3>
<p>
<pre>
RewriteCond  %{HTTP_USER_AGENT} ^.+iPhone
RewriteCond  %{REQUEST_FILENAME} !.*iphone
RewriteRule  ^(.*)$ /iphone/$1 [L,R=301]
</pre></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[SEO: Page title in your URL]]></title>
<link>http://vailo.wordpress.com/?p=166</link>
<pubDate>Wed, 13 Aug 2008 10:51:36 +0000</pubDate>
<dc:creator>vailo</dc:creator>
<guid>http://vailo.wordpress.com/?p=166</guid>
<description><![CDATA[We already covered the basic idea behind the friendly URL and how it can bring more visitors to your]]></description>
<content:encoded><![CDATA[<p>We already covered the basic idea behind the friendly URL and how it can bring more visitors to your web page. If you missed the post where we discussed this and implemented the mod_rewrite module in Apache, you can <a title="Friendly URLs" href="http://vailo.wordpress.com/2008/06/30/friendly-urls-with-wamp-apache/" target="_blank">read all about friendly URLs and our setup right here</a>. One growing, important, feature nowadays is the URL. People didn't come up with the idea of manipulating the URL people type in for no reason. It should be simple and easy to navigate through a website, right? Today we are going to make navigation via URL's even simpler, especially for dynamically build up websites. This is the idea:</p>
<p>Instead of using id's in the URL we are going to use the page title. We will not include the id of the object in the URL because if we had to do that, this wouldn't make it easier to navigate through since you have to know both the id and title of the object. In this post we will take a look at how we can use a game title instead a game id in our URL. The visitors of the site can easily guess the title of the game and just type it in!<br />
<!--more--><br />
Then end result will look something like this:</p>
<blockquote><p>http://www.dosspot.com/games/sam-and-max-hit-the-road/</p></blockquote>
<p>Looks nice? It looks a lot better than the current URL:</p>
<blockquote><p>http://www.dosspot.com/details.php?gameid=1</p></blockquote>
<p>So, here is what we need: A PHP function which takes a string and turn it into friendly chars we can use in our URL, a new column in our database table and finally some new lines in our .htaccess file.</p>
<p>OK, so what do we do with our PHP function? We keep it simple and effective. Anything not matching a char between a-z and A-Z or a number, 0-9, will be removed from the title. Every space we find we replace with a -.</p>
<blockquote><p>Example: Command and Conquer: Tiberan Dawn will do. This title would be suitable as a URL. We use our function and it will look like this: command-and-conquer-tiberan-dawn. Simple, nice and really cool!</p></blockquote>
<p>The implementation of this is not that hard. We extract and remove all bad chars in the title. It's very straightforward. Five lines of code:</p>
<blockquote><p><code>function createPermaLink($string)<br />
{<br />
$string = preg_replace("/(:&#124;;&#124;-&#124;\"&#124;\/&#124;\(&#124;\)&#124;\')/", "", strtolower($string));<br />
$string = preg_replace("/(\s)/", "-", strtolower($string));<br />
return $string;<br />
}</code></p></blockquote>
<p>We will use this function everytime we want to link to a game page. We will send the game title as the argument into the createPermaLink function and it will return a clean and URL friendly string back to us.</p>
<p>Next up we go to the MySQL database table we want to match our perma link with. We add a new coloumn named perma as a varchar length 100. We take the game title and use our newly created createPermaLink function and copy the text and paste it into the new database column. So, the database table might look like this:</p>
<blockquote><p><strong>ID</strong> <strong>Title                                                      Perma</strong><br />
1    Sam and Max Hit the Road             sam-and-max-hit-the-road</p></blockquote>
<p>Now we are able to do a SQL statement and try to select the row with a Perma value matching the incoming perma value from the URL. To be able to send a perma via the URL we need to add lines to our .htaccess file. Again, very easy:</p>
<blockquote><p><code>RewriteRule ^([a-z0-9\-]+)/$ /game.php?perma=$1 [L]</code></p></blockquote>
<p>Here I have a rule saying: Anything that matches a-z chars or 0-9 integers or a - is valid and it's redirected to my game.php page with a querystring attached named perma with a value. The value in our case will be the game title transformed by our createPermaLink function.</p>
<p>So in our game.php file we simple write a SQL statement to fetch the corrent row with our <a title="Database class" href="http://vailo.wordpress.com/2008/06/21/the-database-class/" target="_blank">Database class</a>:</p>
<blockquote><p><code>$perma = mysql_real_escape_string($_GET['perma']);<br />
$result = $db-&#62;fetchQuery("SELECT * FROM games WHERE perma = '$perma'");</code></p></blockquote>
<p>Pretty simple huh? The first line is just making sure that no hackers can break into our database and after that we use the $db object which is an instant of our Database class and we call our fetchQuery method to retrieve the row we want.</p>
<p>Three different areas we need to modify but only with very little code we are able to add the page title in the URL quite simple. The URL's is a lot nicer and SEO loves it!</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[DreamHost httpd.conf]]></title>
<link>http://htaccess.wordpress.com/?p=57</link>
<pubDate>Tue, 12 Aug 2008 03:57:28 +0000</pubDate>
<dc:creator>htaccess</dc:creator>
<guid>http://htaccess.wordpress.com/?p=57</guid>
<description><![CDATA[##
## Old DreamHost httpd.conf -- Apache HTTP server configuration file
##

#
# Based upon the NCSA ]]></description>
<content:encoded><![CDATA[<pre style="background-color:#111111;color:#ffffff;font-size:12px;">##
## <a title="httpd.conf" href="http://z.askapache.com/text/dreamhost.httpd.conf">Old DreamHost httpd.conf -- Apache HTTP server configuration file</a>
##

#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See &#60;URL:http://httpd.apache.org/docs/&#62; for detailed information about
# the directives.
#
# Do <span style="background-color:#ffff00;"><span style="color:#808080;">NOT</span></span><span class="c1"> simply read the instructions in here without understanding
# what they do.  They're here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned.
#
# After this file is processed, the server will look for and process
# /usr/local/dh/apache/template/etc/srm.conf and then /usr/local/dh/apache/template/etc/access.conf
# unless you have overridden these with ResourceConfig and/or
# AccessConfig directives here.
#
# The configuration directives are grouped into three basic sections:
#  1. Directives that control the operation of the Apache server process as a
#     whole (the 'global environment').
#  2. Directives that define the parameters of the 'main' or 'default' server,
#     which responds to requests that aren't handled by a virtual host.
#     These directives also provide default values for the settings
#     of all virtual hosts.
#  3. Settings for virtual hosts, which allow Web requests to be sent to
#     different IP addresses or hostnames and have them handled by the
#     same Apache server process.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path.  If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
# with ServerRoot set to "/usr/local/apache" will be interpreted by the
# server as "/usr/local/apache/logs/foo.log".
#

### Section 1: Global Environment
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests it can handle or where it
# can find its configuration files.
#

#
# ServerType is either inetd, or standalone.  Inetd mode is only supported on
# Unix platforms.
#
<span class="c4"><strong>ServerType</strong></span> <span style="color:#ff40ff;"><strong>standalone</strong></span>

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE!  If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the LockFile documentation
# (available at &#60;URL:http://www.apache.org/docs/mod/core.html#lockfile&#62;);
# you will save yourself a lot of trouble.
#
<span class="c4"><strong>ServerRoot</strong></span> <span style="color:#ff40ff;"><strong>"/usr/local/dh/apache/template"</strong></span>

#
# The LockFile directive sets the path to the lockfile used when Apache
# is compiled with either USE_FCNTL_SERIALIZED_ACCEPT or
# USE_FLOCK_SERIALIZED_ACCEPT. This directive should normally be left at
# its default value. The main reason for changing it is if the logs
# directory is NFS mounted, since the lockfile MUST BE STORED ON A LOCAL
# DISK. The PID of the main server process is automatically appended to
# the filename.
#
#LockFile /usr/local/dh/apache/logs/httpd.lock

#
# PidFile: The file in which the server should record its process
# identification number when it starts.
#
<span class="c4"><strong>PidFile</strong></span> /usr/local/dh/apache/logs/httpd.pid

#
# ScoreBoardFile: File used to store internal server process information.
# Not all architectures require this.  But if yours does (you'll know because
# this file will be  created when you run Apache) then you *must* ensure that
# no two invocations of Apache share the same scoreboard file.
#
<span class="c4"><strong>ScoreBoardFile</strong></span> /usr/local/dh/apache/logs/httpd.scoreboard

#
# In the standard configuration, the server will process httpd.conf (this
# file, specified by the -f command line option), srm.conf, and access.conf
# in that order.  The latter two files are now distributed empty, as it is
# recommended that all directives be kept in a single file for simplicity.
# The commented-out values below are the built-in defaults.  You can have the
# server ignore these files altogether by using "/dev/null" (for Unix) or
# "nul" (for Win32) for the arguments to the directives.
#
#ResourceConfig /usr/local/dh/apache/template/etc/srm.conf
#AccessConfig /usr/local/dh/apache/template/etc/access.conf

#
# Timeout: The number of seconds before receives and sends time out.
#
<span class="c4"><strong>Timeout</strong></span> 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
<span class="c4"><strong>KeepAlive</strong></span> <span style="color:#ff40ff;"><strong>On</strong></span>

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
<span class="c4"><strong>MaxKeepAliveRequests</strong></span> 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
<span class="c4"><strong>KeepAliveTimeout</strong></span> 15

#
# Server-pool size regulation.  Rather than making you guess how many
# server processes you need, Apache dynamically adapts to the load it
# sees --- that is, it tries to maintain enough server processes to
# handle the current load, plus a few spare servers to handle transient
# load spikes (e.g., multiple simultaneous requests from a single
# Netscape browser).
#
# It does this by periodically checking how many servers are waiting
# for a request.  If there are fewer than MinSpareServers, it creates
# a new spare.  If there are more than MaxSpareServers, some of the
# spares die off.  The default values are probably OK for most sites.
#
<span class="c4"><strong>MinSpareServers</strong></span> 5
<span class="c4"><strong>MaxSpareServers</strong></span> 10

#
# Number of servers to start initially --- should be a reasonable ballpark
# figure.
#
<span class="c4"><strong>StartServers</strong></span> 5

#
# Limit on total number of servers running, i.e., limit on the number
# of clients who can simultaneously connect --- if this limit is ever
# reached, clients will be LOCKED OUT, so it should </span><span style="background-color:#ffff00;"><span style="color:#808080;">NOT</span></span><span class="c1"> BE SET TOO LOW.
# It is intended mainly as a brake to keep a runaway server from taking
# the system with it as it spirals down...
#
<span class="c4"><strong>MaxClients</strong></span> 150

#
# MaxRequestsPerChild: the number of requests each child process is
# allowed to process before the child dies.  The child will exit so
# as to avoid problems after prolonged use when Apache (and maybe the
# libraries it uses) leak memory or other resources.  On most systems, this
# isn't really needed, but a few (such as Solaris) do have notable leaks
# in the libraries. For these platforms, set to something like 10000
# or so; a setting of 0 means unlimited.
#
# NOTE: This value does not include keepalive requests after the initial
#       request per connection. For example, if a child process handles
#       an initial request and 10 subsequent "keptalive" requests, it
#       would only count as 1 request towards this limit.
#
<span class="c4"><strong>MaxRequestsPerChild</strong></span> 0

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the &#60;VirtualHost&#62;
# directive.
#
#Listen 3000
#Listen 12.34.56.78:80

#
# BindAddress: You can support virtual hosts with this option. This directive
# is used to tell the server which IP address to listen to. It can either
# contain "*", an IP address, or a fully qualified Internet domain name.
# See also the &#60;VirtualHost&#62; and Listen directives.
#
#BindAddress *

#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Please read the file http://httpd.apache.org/docs/dso.html for more
# details about the DSO mechanism and run `httpd -l' for the list of already
# built-in (statically linked and thus always available) modules in your httpd
# binary.
#
# Note: The order in which modules are loaded is important.  Don't change
# the order below without expert advice.
#
# Example:
# LoadModule foo_module libexec/mod_foo.so
<span class="c4"><strong>LoadModule</strong></span> mmap_static_module libexec/mod_mmap_static.so
<span class="c4"><strong>LoadModule</strong></span> vhost_alias_module libexec/mod_vhost_alias.so
<span class="c4"><strong>LoadModule</strong></span> env_module         libexec/mod_env.so
<span class="c4"><strong>LoadModule</strong></span> config_log_module  libexec/mod_log_config.so
<span class="c4"><strong>LoadModule</strong></span> agent_log_module   libexec/mod_log_agent.so
<span class="c4"><strong>LoadModule</strong></span> referer_log_module libexec/mod_log_referer.so
<span class="c4"><strong>LoadModule</strong></span> mime_magic_module  libexec/mod_mime_magic.so
<span class="c4"><strong>LoadModule</strong></span> mime_module        libexec/mod_mime.so
<span class="c4"><strong>LoadModule</strong></span> negotiation_module libexec/mod_negotiation.so
<span class="c4"><strong>LoadModule</strong></span> status_module      libexec/mod_status.so
<span class="c4"><strong>LoadModule</strong></span> info_module        libexec/mod_info.so
<span class="c4"><strong>LoadModule</strong></span> includes_module    libexec/mod_include.so
<span class="c4"><strong>LoadModule</strong></span> autoindex_module   libexec/mod_autoindex.so
<span class="c4"><strong>LoadModule</strong></span> dir_module         libexec/mod_dir.so
<span class="c4"><strong>LoadModule</strong></span> cgi_module         libexec/mod_cgi.so
<span class="c4"><strong>LoadModule</strong></span> asis_module        libexec/mod_asis.so
<span class="c4"><strong>LoadModule</strong></span> imap_module        libexec/mod_imap.so
<span class="c4"><strong>LoadModule</strong></span> action_module      libexec/mod_actions.so
<span class="c4"><strong>LoadModule</strong></span> speling_module     libexec/mod_speling.so
<span class="c4"><strong>LoadModule</strong></span> userdir_module     libexec/mod_userdir.so
<span class="c4"><strong>LoadModule</strong></span> alias_module       libexec/mod_alias.so
<span class="c4"><strong>LoadModule</strong></span> rewrite_module     libexec/mod_rewrite.so
<span class="c4"><strong>LoadModule</strong></span> access_module      libexec/mod_access.so
<span class="c4"><strong>LoadModule</strong></span> auth_module        libexec/mod_auth.so
<span class="c4"><strong>LoadModule</strong></span> anon_auth_module   libexec/mod_auth_anon.so
<span class="c4"><strong>LoadModule</strong></span> digest_auth_module libexec/mod_auth_digest.so
<span class="c4"><strong>LoadModule</strong></span> proxy_module       libexec/libproxy.so
<span class="c4"><strong>LoadModule</strong></span> cern_meta_module   libexec/mod_cern_meta.so
<span class="c4"><strong>LoadModule</strong></span> expires_module     libexec/mod_expires.so
<span class="c4"><strong>LoadModule</strong></span> headers_module     libexec/mod_headers.so
<span class="c4"><strong>LoadModule</strong></span> usertrack_module   libexec/mod_usertrack.so
<span class="c4"><strong>LoadModule</strong></span> example_module     libexec/mod_example.so
<span class="c4"><strong>LoadModule</strong></span> log_forensic_module libexec/mod_log_forensic.so
<span class="c4"><strong>LoadModule</strong></span> unique_id_module   libexec/mod_unique_id.so
<span class="c4"><strong>LoadModule</strong></span> setenvif_module    libexec/mod_setenvif.so

#  Reconstruction of the complete module list from all available modules
#  (static and shared ones) to achieve correct module execution order.
#  [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO]
<span class="c4"><strong>ClearModuleList</strong></span>
<span class="c4"><strong>AddModule</strong></span> mod_mmap_static.c
<span class="c4"><strong>AddModule</strong></span> mod_vhost_alias.c
<span class="c4"><strong>AddModule</strong></span> mod_env.c
<span class="c4"><strong>AddModule</strong></span> mod_define.c
<span class="c4"><strong>AddModule</strong></span> mod_log_config.c
<span class="c4"><strong>AddModule</strong></span> mod_log_agent.c
<span class="c4"><strong>AddModule</strong></span> mod_log_referer.c
<span class="c4"><strong>AddModule</strong></span> mod_mime_magic.c
<span class="c4"><strong>AddModule</strong></span> mod_mime.c
<span class="c4"><strong>AddModule</strong></span> mod_negotiation.c
<span class="c4"><strong>AddModule</strong></span> mod_status.c
<span class="c4"><strong>AddModule</strong></span> mod_info.c
<span class="c4"><strong>AddModule</strong></span> mod_include.c
<span class="c4"><strong>AddModule</strong></span> mod_autoindex.c
<span class="c4"><strong>AddModule</strong></span> mod_dir.c
<span class="c4"><strong>AddModule</strong></span> mod_cgi.c
<span class="c4"><strong>AddModule</strong></span> mod_asis.c
<span class="c4"><strong>AddModule</strong></span> mod_imap.c
<span class="c4"><strong>AddModule</strong></span> mod_actions.c
<span class="c4"><strong>AddModule</strong></span> mod_speling.c
<span class="c4"><strong>AddModule</strong></span> mod_userdir.c
<span class="c4"><strong>AddModule</strong></span> mod_alias.c
<span class="c4"><strong>AddModule</strong></span> mod_rewrite.c
<span class="c4"><strong>AddModule</strong></span> mod_access.c
<span class="c4"><strong>AddModule</strong></span> mod_auth.c
<span class="c4"><strong>AddModule</strong></span> mod_auth_anon.c
<span class="c4"><strong>AddModule</strong></span> mod_auth_digest.c
<span class="c4"><strong>AddModule</strong></span> mod_proxy.c
<span class="c4"><strong>AddModule</strong></span> mod_cern_meta.c
<span class="c4"><strong>AddModule</strong></span> mod_expires.c
<span class="c4"><strong>AddModule</strong></span> mod_headers.c
<span class="c4"><strong>AddModule</strong></span> mod_usertrack.c
<span class="c4"><strong>AddModule</strong></span> mod_example.c
<span class="c4"><strong>AddModule</strong></span> mod_log_forensic.c
<span class="c4"><strong>AddModule</strong></span> mod_unique_id.c
<span class="c4"><strong>AddModule</strong></span> mod_so.c
<span class="c4"><strong>AddModule</strong></span> mod_setenvif.c
<span style="color:#ffff00;"><strong>&#60;IfDefine</strong></span><span style="color:#ff40ff;"><strong> SSL</strong></span><span style="color:#ffff00;"><strong>&#62;</strong></span>
<span class="c4"><strong>AddModule</strong></span> mod_ssl.c
<span style="color:#ffff00;"><strong>&#60;/IfDefine&#62;</strong></span>
<span class="c4"><strong>AddModule</strong></span> mod_dosevasive.c

#
# ExtendedStatus controls whether Apache will generate "full" status

# information (ExtendedStatus On) or just basic information (ExtendedStatus
# Off) when the "server-status" handler is called. The default is Off.
#
#ExtendedStatus On

### Section 2: 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# &#60;VirtualHost&#62; definition.  These values also provide defaults for
# any &#60;VirtualHost&#62; containers you may define later in the file.
#
# All of these directives may appear inside &#60;VirtualHost&#62; containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#

#
# If your ServerType directive (set earlier in the 'Global Environment'
# section) is set to "inetd", the next few directives don't have any
# effect since their settings are defined by the inetd configuration.
# Skip ahead to the ServerAdmin directive.
#

#
# Port: The port to which the standalone server listens. For
# ports &#60; 1023, you will need httpd to be run as root initially.
#
<span class="c4"><strong>Port</strong></span> 8080

##
##  SSL Support
##
##  When we also provide SSL we have to listen to the
##  standard HTTP port (see above) and to the HTTPS port
##
<span style="color:#ffff00;"><strong>&#60;IfDefine</strong></span><span style="color:#ff40ff;"><strong> SSL</strong></span><span style="color:#ffff00;"><strong>&#62;</strong></span>
<span class="c4"><strong>Listen</strong></span> 8080
<span class="c4"><strong>Listen</strong></span> 8443
<span style="color:#ffff00;"><strong>&#60;/IfDefine&#62;</strong></span>

#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
#  . On SCO (ODT 3) use "User nouser" and "Group nogroup".
#  . On HPUX you may not be able to use shared memory as nobody, and the
#    suggested workaround is to create a user www and use that user.
#  NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
#  when the value of (unsigned)Group is above 60000;
#  don't use Group "#-1" on these systems!
#
<span style="color:#ff40ff;"><strong>User</strong></span> nobody
<span style="color:#ff40ff;"><strong>Group</strong></span> nogroup

#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed.  This address appears on some server-generated pages, such
# as error documents.
#
<span class="c4"><strong>ServerAdmin</strong></span> jeremy@hightower.sd.dreamhost.com

#
# ServerName allows you to set a host name which is sent back to clients for
# your server if it's different than the one the program would get (i.e., use
# "www" instead of the host's real name).
#
# Note: You cannot just invent host names and hope they work. The name you
# define here must be a valid DNS name for your host. If you don't understand
# this, ask your network administrator.
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address (e.g., http://123.45.67.89/)
# anyway, and this will make redirections work in a sensible way.
#
# 127.0.0.1 is the TCP/IP local loop-back address, often named localhost. Your
# machine always knows itself by this address. If you use Apache strictly for
# local testing and development, you may use 127.0.0.1 as the server name.
#
#ServerName www.example.com

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
<span class="c4"><strong>DocumentRoot</strong></span> <span style="color:#ff40ff;"><strong>"/usr/local/dh/apache/template/docs"</strong></span>

#
# Each directory to which Apache has access, can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# permissions.
#
<span style="color:#ffff00;"><strong>&#60;Directory</strong></span><span style="color:#ff40ff;"><strong> /</strong></span><span style="color:#ffff00;"><strong>&#62;</strong></span>
    <span class="c4"><strong>Options</strong></span> <span style="color:#ff40ff;"><strong>FollowSymLinks</strong></span>
    <span class="c4"><strong>AllowOverride</strong></span> <span style="color:#ff40ff;"><strong>None</strong></span>
<span style="color:#ffff00;"><strong>&#60;/Directory&#62;</strong></span>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<span style="color:#ffff00;"><strong>&#60;Directory</strong></span><span style="color:#ff40ff;"><strong> "/usr/local/dh/apache/template/docs"</strong></span><span style="color:#ffff00;"><strong>&#62;</strong></span>

#
# This may also be "None", "All", or any combination of "Indexes",
# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
    <span class="c4"><strong>Options</strong></span> <span style="color:#ff40ff;"><strong>Indexes</strong></span> <span style="color:#ff40ff;"><strong>FollowSymLinks</strong></span> <span style="color:#ff40ff;"><strong>MultiViews</strong></span>

#
# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
#
    <span class="c4"><strong>AllowOverride</strong></span> <span style="color:#ff40ff;"><strong>None</strong></span>

#
# Controls who can get stuff from this server.
#
<span style="color:#ff40ff;">    Order </span><span style="color:#ff40ff;"><strong>allow</strong></span><span style="color:#ff40ff;">,</span><span style="color:#ff40ff;"><strong>deny</strong></span>
    <span style="color:#8080ff;"><strong>Allow from </strong></span><strong>all</strong>
<span style="color:#ffff00;"><strong>&#60;/Directory&#62;</strong></span>

#
# UserDir: The name of the directory which is appended onto a user's home
# directory if a ~user request is received.
#
<span style="color:#ffff00;"><strong>&#60;IfModule</strong></span><span style="color:#ff40ff;"><strong> mod_userdir.c</strong></span><span style="color:#ffff00;"><strong>&#62;</strong></span>
    <span class="c4"><strong>UserDir</strong></span> public_html
<span style="color:#ffff00;"><strong>&#60;/IfModule&#62;</strong></span>

#
# Control access to UserDir directories.  The following is an example
# for a site where these directories are restricted to read-only.
#
#&#60;Directory /home/*/public_html&#62;
#    AllowOverride FileInfo AuthConfig Limit
#    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
#    &#60;Limit GET POST OPTIONS PROPFIND&#62;
#        Order allow,deny
#        Allow from all
#    &#60;/Limit&#62;
#    &#60;LimitExcept GET POST OPTIONS PROPFIND&#62;
#        Order deny,allow
#        Deny from all
#    &#60;/LimitExcept&#62;
#&#60;/Directory&#62;

#
# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index.  Separate multiple entries with spaces.
#
<span style="color:#ffff00;"><strong>&#60;IfModule</strong></span><span style="color:#ff40ff;"><strong> mod_dir.c</strong></span><span style="color:#ffff00;"><strong>&#62;</strong></span>
    <span class="c4"><strong>DirectoryIndex</strong></span> index.html
<span style="color:#ffff00;"><strong>&#60;/IfModule&#62;</strong></span>

#
# AccessFileName: The name of the file to look for in each directory
# for access control information.
#
<span class="c4"><strong>AccessFileName</strong></span> .htaccess

#
# The following lines prevent .htaccess files from being viewed by
# Web clients.  Since .htaccess files often contain authorization
# information, access is disallowed for security reasons.  Comment
# these lines out if you want Web visitors to see the contents of
# .htaccess files.  If you change the AccessFileName directive above,
# be sure to make the corresponding changes here.
#
# Also, folks tend to use names such as .htpasswd for password
# files, so this will protect those as well.
#
<span style="color:#ffff00;"><strong>&#60;Files</strong></span><span style="color:#ff40ff;"><strong> ~ "^\.ht"</strong></span><span style="color:#ffff00;"><strong>&#62;</strong></span>
<span style="color:#ff40ff;">    Order </span><span style="color:#ff40ff;"><strong>allow</strong></span><span style="color:#ff40ff;">,</span><span style="color:#ff40ff;"><strong>deny</strong></span>
    <span style="color:#8080ff;"><strong>Deny from </strong></span><strong>all</strong>
    <span class="c4"><strong>Satisfy</strong></span> <span style="color:#ff40ff;"><strong>All</strong></span>
<span style="color:#ffff00;"><strong>&#60;/Files&#62;</strong></span>

#
# CacheNegotiatedDocs: By default, Apache sends "Pragma: no-cache" with each
# document that was negotiated on the basis of content. This asks proxy
# servers not to cache the document. Uncommenting the following line disables
# this behavior, and proxies will be allowed to cache the documents.
#
#CacheNegotiatedDocs

#
# UseCanonicalName:  (new for 1.3)  With this setting turned on, whenever
# Apache needs to construct a self-referencing URL (a URL that refers back
# to the server the response is coming from) it will use ServerName and
# Port to form a "canonical" name.  With this setting off, Apache will
# use the hostname:port that the client supplied, when possible.  This
# also affects SERVER_NAME and SERVER_PORT in CGI scripts.
#
<span class="c4"><strong>UseCanonicalName</strong></span> <span style="color:#ff40ff;"><strong>On</strong></span>

#
# TypesConfig describes where the mime.types file (or equivalent) is
# to be found.
#
<span style="color:#ffff00;"><strong>&#60;IfModule</strong></span><span style="color:#ff40ff;"><strong> mod_mime.c</strong></span><span style="color:#ffff00;"><strong>&#62;</strong></span>
    <span class="c4"><strong>TypesConfig</strong></span> /usr/local/dh/apache/template/etc/mime.types
<span style="color:#ffff00;"><strong>&#60;/IfModule&#62;</strong></span>

#
# DefaultType is the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value.  If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#
<span class="c4"><strong>DefaultType</strong></span> text/plain

#
# The mod_mime_magic module allows the server to use various hints from the
# contents of the file itself to determine its type.  The MIMEMagicFile
# directive tells the module where the hint definitions are located.
# mod_mime_magic is not part of the default server (you have to add
# it yourself with a LoadModule [see the DSO paragraph in the 'Global
# Environment' section], or recompile the server and include mod_mime_magic
# as part of the configuration), so it's enclosed in an &#60;IfModule&#62; container.
# This means that the MIMEMagicFile directive will only be processed if the
# module is part of the server.
#
<span style="color:#ffff00;"><strong>&#60;IfModule</strong></span><span style="color:#ff40ff;"><strong> mod_mime_magic.c</strong></span><span style="color:#ffff00;"><strong>&#62;</strong></span>
    <span class="c4"><strong>MIMEMagicFile</strong></span> /usr/local/dh/apache/template/etc/magic
<span style="color:#ffff00;"><strong>&#60;/IfModule&#62;</strong></span>

#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
<span class="c4"><strong>HostnameLookups</strong></span> <span style="color:#ff40ff;"><strong>Off</strong></span>

#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a &#60;VirtualHost&#62;
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a &#60;VirtualHost&#62;
# container, that host's errors will be logged there and not here.
#
<span class="c4"><strong>ErrorLog</strong></span> /usr/local/dh/apache/logs/error_log

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
<span class="c4"><strong>LogLevel</strong></span> <span style="color:#ff40ff;"><strong>warn</strong></span>

#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
<span class="c4"><strong>LogFormat</strong></span> <span style="color:#ff40ff;"><strong>"%h %l %u %t \"%r\" %&#62;s %b \"%{Referer}i\" \"%{User-Agent}i\""</strong></span> combined
<span class="c4"><strong>LogFormat</strong></span> <span style="color:#ff40ff;"><strong>"%h %l %u %t \"%r\" %&#62;s %b"</strong></span> common
<span class="c4"><strong>LogFormat</strong></span> <span style="color:#ff40ff;"><strong>"%{Referer}i -&#62; %U"</strong></span> <span style="color:#ff40ff;"><strong>referer</strong></span>
<span class="c4"><strong>LogFormat</strong></span> <span style="color:#ff40ff;"><strong>"%{User-agent}i"</strong></span> agent

#
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a &#60;VirtualHost&#62;
# container, they will be logged here.  Contrariwise, if you *do*
# define per-&#60;VirtualHost&#62; access logfiles, transactions will be
# logged therein and *not* in this file.
#
<span class="c4"><strong>CustomLog</strong></span> /usr/local/dh/apache/logs/access_log common

#
# If you would like to have agent and referer logfiles, uncomment the
# following directives.
#
#CustomLog /usr/local/dh/apache/logs/referer_log referer
#CustomLog /usr/local/dh/apache/logs/agent_log agent

#
# If you prefer a single logfile with access, agent, and referer information
# (Combined Logfile Format) you can use the following directive.
#
#CustomLog /usr/local/dh/apache/logs/access_log combined

#
# Optionally add a line containing the server version and virtual host
# name to server-generated pages (error documents, FTP directory listings,
# mod_status and mod_info output etc., but not CGI generated documents).
# Set to "EMail" to also include a mailto: link to the ServerAdmin.
# Set to one of:  On &#124; Off &#124; EMail
#
<span class="c4"><strong>ServerSignature</strong></span> <span style="color:#ff40ff;"><strong>On</strong></span>

# EBCDIC configuration:
# (only for mainframes using the EBCDIC codeset, currently one of:
# Fujitsu-Siemens' BS2000/OSD, IBM's OS/390 and IBM's TPF)!!
# The following default configuration assumes that "text files"
# are stored in EBCDIC (so that you can operate on them using the
# normal POSIX tools like grep and sort) while "binary files" are
# stored with identical octets as on an ASCII machine.
#
# The directives are evaluated in configuration file order, with
# the EBCDICConvert directives applied before EBCDICConvertByType.
#
# If you want to have ASCII HTML documents and EBCDIC HTML documents
# at the same time, you can use the file extension to force
# conversion off for the ASCII documents:
# &#62; AddType       text/html .ahtml
# &#62; EBCDICConvert Off=InOut .ahtml
#
# EBCDICConvertByType  On=InOut text/* message/* multipart/*
# EBCDICConvertByType  On=In    application/x-www-form-urlencoded
# EBCDICConvertByType  On=InOut application/postscript model/vrml
# EBCDICConvertByType Off=InOut */*

#
# Aliases: Add here as many aliases as you need (with no limit). The format is
# Alias fakename realname
#
<span style="color:#ffff00;"><strong>&#60;IfModule</strong></span><span style="color:#ff40ff;"><strong> mod_alias.c</strong></span><span style="color:#ffff00;"><strong>&#62;</strong></span>

    #
    # Note that if you include a trailing / on fakename then the server will
    # require it to be present in the URL.  So "/icons" isn't aliased in this
    # example, only "/icons/".  If the fakename is slash-terminated, then the
    # realname must also be slash terminated, and if the fakename omits the
    # trailing slash, the realname must also omit it.
    #
    <span class="c4"><strong>Alias</strong></span> /icons/ <span style="color:#ff40ff;"><strong>"/usr/local/dh/apache/template/icons/"</strong></span>

    <span style="color:#ffff00;"><strong>&#60;Directory</strong></span><span style="color:#ff40ff;"><strong> "/usr/local/dh/apache/template/icons"</strong></span><span style="color:#ffff00;"><strong>&#62;</strong></span>
        <span class="c4"><strong>Options</strong></span> <span style="color:#ff40ff;"><strong>Indexes</strong></span> <span style="color:#ff40ff;"><strong>MultiViews</strong></span>
        <span class="c4"><strong>AllowOverride</strong></span> <span style="color:#ff40ff;"><strong>None</strong></span>
<span style="color:#ff40ff;">        Order </span><span style="color:#ff40ff;"><strong>allow</strong></span><span style="color:#ff40ff;">,</span><span style="color:#ff40ff;"><strong>deny</strong></span>
        <span style="color:#8080ff;"><strong>Allow from </strong></span><strong>all</strong>
    <span style="color:#ffff00;"><strong>&#60;/Directory&#62;</strong></span>

    # This Alias will project the on-line documentation tree under /manual/
    # even if you change the DocumentRoot. Comment it if you don't want to
    # provide access to the on-line documentation.
    #
    <span class="c4"><strong>Alias</strong></span> /manual/ <span style="color:#ff40ff;"><strong>"/usr/local/dh/apache/template/docs/manual/"</strong></span>

    <span style="color:#ffff00;"><strong>&#60;Directory</strong></span><span style="color:#ff40ff;"><strong> "/usr/local/dh/apache/template/docs/manual"</strong></span><span style="color:#ffff00;"><strong>&#62;</strong></span>
        <span class="c4"><strong>Options</strong></span> <span style="color:#ff40ff;"><strong>Indexes</strong></span> <span style="color:#ff40ff;"><strong>FollowSymlinks</strong></span> <span style="color:#ff40ff;"><strong>MultiViews</strong></span>
        <span class="c4"><strong>AllowOverride</strong></span> <span style="color:#ff40ff;"><strong>None</strong></span>
<span style="color:#ff40ff;">        Order </span><span style="color:#ff40ff;"><strong>allow</strong></span><span style="color:#ff40ff;">,</span><span style="color:#ff40ff;"><strong>deny</strong></span>
        <span style="color:#8080ff;"><strong>Allow from </strong></span><strong>all</strong>
    <span style="color:#ffff00;"><strong>&#60;/Directory&#62;</strong></span>

    #
    # ScriptAlias: This controls which directories contain server scripts.
    # ScriptAliases are essentially the same as Aliases, except that
    # documents in the realname directory are treated as applications and
    # run by the server when requested rather than as documents sent to the client.
    # The same rules about trailing "/" apply to ScriptAlias directives as to
    # Alias.
    #
    <span class="c4"><strong>ScriptAlias</strong></span> /cgi-bin/ <span style="color:#ff40ff;"><strong>"/usr/local/dh/web/cgi-bin/"</strong></span>

    #
    # "/usr/local/dh/web/cgi-bin" should be changed to whatever your ScriptAliased
    # CGI directory exists, if you have that configured.
    #
    <span style="color:#ffff00;"><strong>&#60;Directory</strong></span><span style="color:#ff40ff;"><strong> "/usr/local/dh/web/cgi-bin"</strong></span><span style="color:#ffff00;"><strong>&#62;</strong></span>
        <span class="c4"><strong>AllowOverride</strong></span> <span style="color:#ff40ff;"><strong>None</strong></span>
        <span class="c4"><strong>Options</strong></span> <span style="color:#ff40ff;"><strong>None</strong></span>
<span style="color:#ff40ff;">        Order </span><span style="color:#ff40ff;"><strong>allow</strong></span><span style="color:#ff40ff;">,</span><span style="color:#ff40ff;"><strong>deny</strong></span>
        <span style="color:#8080ff;"><strong>Allow from </strong></span><strong>all</strong>
    <span style="color:#ffff00;"><strong>&#60;/Directory&#62;</strong></span>

<span style="color:#ffff00;"><strong>&#60;/IfModule&#62;</strong></span>
# End of aliases.

#
# Redirect allows you to tell clients about documents which used to exist in
# your server's namespace, but do not anymore. This allows you to tell the
# clients where to look for the relocated document.
# Format: Redirect old-URI new-URL
#

#
# Directives controlling the display of server-generated directory listings.
#
<span style="color:#ffff00;"><strong>&#60;IfModule</strong></span><span style="color:#ff40ff;"><strong> mod_autoindex.c</strong></span><span style="color:#ffff00;"><strong>&#62;</strong></span>

    #
    # FancyIndexing is whether you want fancy directory indexing or standard
    #
    <span class="c4"><strong>IndexOptions</strong></span> <span style="color:#ff40ff;"><strong>FancyIndexing</strong></span>

    #
    # AddIcon* directives tell the server which icon to show for different
    # files or filename extensions.  These are only displayed for
    # FancyIndexed directories.
    #
    <span class="c4"><strong>AddIconByEncoding</strong></span> (CMP,/icons/compressed.gif) x-compress x-gzip

    <span class="c4"><strong>AddIconByType</strong></span> (TXT,/icons/text.gif) text/*
    <span class="c4"><strong>AddIconByType</strong></span> (IMG,/icons/image2.gif) image/*
    <span class="c4"><strong>AddIconByType</strong></span> (SND,/icons/sound2.gif) audio/*
    <span class="c4"><strong>AddIconByType</strong></span> (VID,/icons/movie.gif) video/*

    <span class="c4"><strong>AddIcon</strong></span> /icons/binary.gif .bin .exe
    <span class="c4"><strong>AddIcon</strong></span> /icons/binhex.gif .hqx
    <span class="c4"><strong>AddIcon</strong></span> /icons/tar.gif .tar
    <span class="c4"><strong>AddIcon</strong></span> /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
    <span class="c4"><strong>AddIcon</strong></span> /icons/compressed.gif .Z .z .tgz .gz .zip
    <span class="c4"><strong>AddIcon</strong></span> /icons/a.gif .ps .ai .eps
    <span class="c4"><strong>AddIcon</strong></span> /icons/layout.gif .html .shtml .htm .pdf
    <span class="c4"><strong>AddIcon</strong></span> /icons/text.gif .txt
    <span class="c4"><strong>AddIcon</strong></span> /icons/c.gif .c
    <span class="c4"><strong>AddIcon</strong></span> /icons/p.gif .pl .py
    <span class="c4"><strong>AddIcon</strong></span> /icons/f.gif .for
    <span class="c4"><strong>AddIcon</strong></span> /icons/dvi.gif .dvi
    <span class="c4"><strong>AddIcon</strong></span> /icons/uuencoded.gif .uu
    <span class="c4"><strong>AddIcon</strong></span> /icons/<span class="c4"><strong>script</strong></span>.gif .conf .sh .shar .csh .ksh .tcl
    <span class="c4"><strong>AddIcon</strong></span> /icons/tex.gif .tex
    <span class="c4"><strong>AddIcon</strong></span> /icons/bomb.gif core

    <span class="c4"><strong>AddIcon</strong></span> /icons/back.gif ..
    <span class="c4"><strong>AddIcon</strong></span> /icons/hand.right.gif README
    <span class="c4"><strong>AddIcon</strong></span> /icons/folder.gif ^^DIRECTORY^^
    <span class="c4"><strong>AddIcon</strong></span> /icons/blank.gif ^^BLANKICON^^

    #
    # DefaultIcon is which icon to show for files which do not have an icon
    # explicitly set.
    #
    <span class="c4"><strong>DefaultIcon</strong></span> /icons/unknown.gif

    #
    # AddDescription allows you to place a short description after a file in
    # server-generated indexes.  These are only displayed for FancyIndexed
    # directories.
    # Format: AddDescription "description" filename
    #
    #AddDescription "GZIP compressed document" .gz
    #AddDescription "tar archive" .tar
    #AddDescription "GZIP compressed tar archive" .tgz

    #
    # ReadmeName is the name of the README file the server will look for by
    # default, and append to directory listings.
    #
    # HeaderName is the name of a file which should be prepended to
    # directory indexes.
    #
    <span class="c4"><strong>ReadmeName</strong></span> README.html
    <span class="c4"><strong>HeaderName</strong></span> <span class="c4"><strong>HEADER</strong></span>.html

    #
    # IndexIgnore is a set of filenames which directory indexing should ignore
    # and not include in the listing.  Shell-style wildcarding is permitted.
    #
    <span class="c4"><strong>IndexIgnore</strong></span> .??* *~ *# <span class="c4"><strong>HEADER</strong></span>* README* RCS CVS *,v *,t

<span style="color:#ffff00;"><strong>&#60;/IfModule&#62;</strong></span>
# End of indexing directives.

#
# Document types.
#
<span style="color:#ffff00;"><strong>&#60;IfModule</strong></span><span style="color:#ff40ff;"><strong> mod_mime.c</strong></span><span style="color:#ffff00;"><strong>&#62;</strong></span>

    #
    # AddLanguage allows you to specify the language of a document. You can
    # then use content negotiation to give a browser a file in a language
    # it can understand.
    #
    # Note 1: The suffix does not have to be the same as the language
    # keyword --- those with documents in Polish (whose net-standard
    # language code is pl) may wish to use "AddLanguage pl .po" to
    # avoid the ambiguity with the common suffix for perl scripts.
    #
    # Note 2: The example entries below illustrate that in quite
    # some cases the two character 'Language' abbreviation is not
    # identical to the two character 'Country' code for its country,
    # E.g. 'Danmark/dk' versus 'Danish/da'.
    #
    # Note 3: In the case of 'ltz' we violate the RFC by using a three char
    # specifier. But there is 'work in progress' to fix this and get
    # the reference data for rfc1766 cleaned up.
    #
    # Danish (da) - Dutch (nl) - English (en) - Estonian (ee)
    # French (fr) - German (de) - Greek-Modern (el)
    # Italian (it) - Korean (kr) - Norwegian (no) - Norwegian Nynorsk (nn)
    # Portugese (pt) - Luxembourgeois* (ltz)
    # Spanish (es) - Swedish (sv) - Catalan (ca) - Czech(cs)
    # Polish (pl) - Brazilian Portuguese (pt-br) - Japanese (ja)
    # Russian (ru)
    #
    <span class="c4"><strong>AddLanguage</strong></span> da .dk
    <span class="c4"><strong>AddLanguage</strong></span> nl .nl
    <span class="c4"><strong>AddLanguage</strong></span> en .en
    <span class="c4"><strong>AddLanguage</strong></span> et .ee
    <span class="c4"><strong>AddLanguage</strong></span> fr .fr
    <span class="c4"><strong>AddLanguage</strong></span> de .de
    <span class="c4"><strong>AddLanguage</strong></span> el .el
    <span class="c4"><strong>AddLanguage</strong></span> he .he
    <span class="c4"><strong>AddCharset</strong></span> ISO-8859-8 .iso8859-8
    <span class="c4"><strong>AddLanguage</strong></span> it .it
    <span class="c4"><strong>AddLanguage</strong></span> ja .ja
    <span class="c4"><strong>AddCharset</strong></span> ISO-2022-JP .jis
    <span class="c4"><strong>AddLanguage</strong></span> kr .kr
    <span class="c4"><strong>AddCharset</strong></span> ISO-2022-KR .iso-kr
    <span class="c4"><strong>AddLanguage</strong></span> nn .nn
    <span class="c4"><strong>AddLanguage</strong></span> no .no
    <span class="c4"><strong>AddLanguage</strong></span> pl .po
    <span class="c4"><strong>AddCharset</strong></span> ISO-8859-2 .iso-pl
    <span class="c4"><strong>AddLanguage</strong></span> pt .pt
    <span class="c4"><strong>AddLanguage</strong></span> pt-br .pt-br
    <span class="c4"><strong>AddLanguage</strong></span> ltz .lu
    <span class="c4"><strong>AddLanguage</strong></span> ca .ca
    <span class="c4"><strong>AddLanguage</strong></span> es .es
    <span class="c4"><strong>AddLanguage</strong></span> sv .sv
    <span class="c4"><strong>AddLanguage</strong></span> cs .cz .cs
    <span class="c4"><strong>AddLanguage</strong></span> ru .ru
    <span class="c4"><strong>AddLanguage</strong></span> zh-TW .zh-tw
    <span class="c4"><strong>AddCharset</strong></span> Big5         .Big5    .big5
    <span class="c4"><strong>AddCharset</strong></span> WINDOWS-1251 .cp-1251
    <span class="c4"><strong>AddCharset</strong></span> CP866        .cp866
    <span class="c4"><strong>AddCharset</strong></span> ISO-8859-5   .iso-ru
    <span class="c4"><strong>AddCharset</strong></span> KOI8-R       .koi8-r
    <span class="c4"><strong>AddCharset</strong></span> UCS-2        .ucs2
    <span class="c4"><strong>AddCharset</strong></span> UCS-4        .ucs4
    <span class="c4"><strong>AddCharset</strong></span> UTF-8        .utf8

    # LanguagePriority allows you to give precedence to some languages
    # in case of a tie during content negotiation.
    #
    # Just list the languages in decreasing order of preference. We have
    # more or less alphabetized them here. You probably want to change this.
    #
    <span style="color:#ffff00;"><strong>&#60;IfModule</strong></span><span style="color:#ff40ff;"><strong> mod_negotiation.c</strong></span><span style="color:#ffff00;"><strong>&#62;</strong></span>
        <span class="c4"><strong>LanguagePriority</strong></span> en da nl et fr de el it ja kr no pl pt pt-br ru ltz ca es sv tw
    <span style="color:#ffff00;"><strong>&#60;/IfModule&#62;</strong></span>

    #
    # AddType allows you to tweak mime.types without actually editing it, or to
    # make certain files to be certain types.
    #
    <span class="c4"><strong>AddType</strong></span> application/x-tar .tgz

    #
    # AddEncoding allows you to have certain browsers uncompress
    # information on the fly. Note: Not all browsers support this.
    # Despite the name similarity, the following Add* directives have nothing
    # to do with the FancyIndexing customization directives above.
    #
    <span class="c4"><strong>AddEncoding</strong></span> x-compress .Z
    <span class="c4"><strong>AddEncoding</strong></span> x-gzip .gz .tgz
    #
    # If the AddEncoding directives above are commented-out, then you
    # probably should define those extensions to indicate media types:
    #
    #AddType application/x-compress .Z
    #AddType application/x-gzip .gz .tgz

    #
    # AddHandler allows you to map certain file extensions to "handlers",
    # actions unrelated to filetype. These can be either built into the server
    # or added with the Action command (see below)
    #
    # If you want to use server side includes, or CGI outside
    # ScriptAliased directories, uncomment the following lines.
    #
    # To use CGI scripts:
    #
    #AddHandler cgi-script .cgi

    #
    # To use server-parsed HTML files
    #
    #AddType text/html .shtml
    #AddHandler server-parsed .shtml

    #
    # Uncomment the following line to enable Apache's send-asis HTTP file
    # feature
    #
    #AddHandler send-as-is asis

    #
    # If you wish to use server-parsed imagemap files, use
    #
    #AddHandler imap-file map

    #
    # To enable type maps, you might want to use
    #
    #AddHandler type-map var

<span style="color:#ffff00;"><strong>&#60;/IfModule&#62;</strong></span>
# End of document types.

#
# Action lets you define media types that will execute a script whenever
# a matching file is called. This eliminates the need for repeated URL
# pathnames for oft-used CGI file processors.
# Format: Action media/type /cgi-script/location
# Format: Action handler-name /cgi-script/location
#

#
# MetaDir: specifies the name of the directory in which Apache can find
# meta information files. These files contain additional HTTP headers
# to include when sending the document
#
#MetaDir .web

#
# MetaSuffix: specifies the file name suffix for the file containing the
# meta information.
#
#MetaSuffix .meta

#
# Customizable error response (Apache style)
#  these come in three flavors
#
#    1) plain text
#ErrorDocument 500 "The server made a boo boo.
#  n.b.  the single leading (") marks it as text, it does not get output
#
#    2) local redirects
#ErrorDocument 404 /missing.html
#  to redirect to local URL /missing.html
#ErrorDocument 404 /cgi-bin/missing_handler.pl
#  N.B.: You can redirect to a script or a document using server-side-includes.
#
#    3) external redirects
#ErrorDocument 402 http://www.example.com/subscription_info.html
#  N.B.: Many of the environment variables associated with the original
#  request will *not* be available to such a script.

#
# Customize behaviour based on the browser
#
<span style="color:#ffff00;"><strong>&#60;IfModule</strong></span><span style="color:#ff40ff;"><strong> mod_setenvif.c</strong></span><span style="color:#ffff00;"><strong>&#62;</strong></span>

    #
    # The following directives modify normal HTTP response behavior.
    # The first directive disables keepalive for Netscape 2.x and browsers that
    # spoof it. There are known problems with these browser implementations.
    # The second directive is for Microsoft Internet Explorer 4.0b2
    # which has a broken HTTP/1.1 implementation and does not properly
    # support keepalive when it is used on 301 or 302 (redirect) responses.
    #
    <span class="c4"><strong>BrowserMatch</strong></span> <span style="color:#ff40ff;"><strong>"Mozilla/2"</strong></span> nokeepalive
    <span class="c4"><strong>BrowserMatch</strong></span> <span style="color:#ff40ff;"><strong>"MSIE 4\.0b2;"</strong></span> nokeepalive downgrade-1.0 force-response-1.0

    #
    # The following directive disables HTTP/1.1 responses to browsers which
    # are in violation of the HTTP/1.0 spec by not being able to grok a
    # basic 1.1 response.
    #
    <span class="c4"><strong>BrowserMatch</strong></span> <span style="color:#ff40ff;"><strong>"RealPlayer 4\.0"</strong></span> force-response-1.0
    <span class="c4"><strong>BrowserMatch</strong></span> <span style="color:#ff40ff;"><strong>"Java/1\.0"</strong></span> force-response-1.0
    <span class="c4"><strong>BrowserMatch</strong></span> <span style="color:#ff40ff;"><strong>"JDK/1\.0"</strong></span> force-response-1.0

<span style="color:#ffff00;"><strong>&#60;/IfModule&#62;</strong></span>
# End of browser customization directives

#
# Allow server status reports, with the URL of
# Change the ".example.com" to match your domain to enable.
#
#&#60;Location /server-status&#62;
#    SetHandler server-status
#    Order deny,allow
#    Deny from all
#    Allow from .example.com
#&#60;/Location&#62;

#
# Allow remote server configuration reports, with the URL of
# http://servername/server-statushttp://servername/server-info (requires that mod_info.c be loaded).
# Change the ".example.com" to match your domain to enable.
#
#&#60;Location /server-info&#62;
#    SetHandler server-info
#    Order deny,allow
#    Deny from all
#    Allow from .example.com
#&#60;/Location&#62;

#
# There have been reports of people trying to abuse an old bug from pre-1.1
# days.  This bug involved a CGI script distributed as a part of Apache.
# By uncommenting these lines you can redirect these attacks to a logging
# script on phf.apache.org.  Or, you can record them yourself, using the script
# support/phf_abuse_log.cgi.
#
#&#60;Location /cgi-bin/phf*&#62;
#    Deny from all
#&#60;/Location&#62;

### Section 3: Virtual Hosts
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at &#60;URL:#    ErrorDocument 403 http://phf.apache.org/phf_abuse_log.cgihttp://www.apache.org/docs/vhosts/&#62;
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
#NameVirtualHost *:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#&#60;VirtualHost *:80&#62;
#    ServerAdmin webmaster@dummy-host.example.com
#    DocumentRoot /www/docs/dummy-host.example.com
#    ServerName dummy-host.example.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
#&#60;/VirtualHost&#62;

#&#60;VirtualHost _default_:*&#62;
#&#60;/VirtualHost&#62;

##
##  SSL Global Context
##
##  All SSL configuration in this context applies both to
##  the main server and all SSL-enabled virtual hosts.
##

#
#   Some MIME-types for downloading Certificates and CRLs
#
<span style="color:#ffff00;"><strong>&#60;IfDefine</strong></span><span style="color:#ff40ff;"><strong> SSL</strong></span><span style="color:#ffff00;"><strong>&#62;</strong></span>
<span class="c4"><strong>AddType</strong></span> application/x-x509-ca-cert .crt
<span class="c4"><strong>AddType</strong></span> application/x-pkcs7-crl    .crl
<span style="color:#ffff00;"><strong>&#60;/IfDefine&#62;</strong></span>

<span style="color:#ffff00;"><strong>&#60;IfModule</strong></span><span style="color:#ff40ff;"><strong> mod_ssl.c</strong></span><span style="color:#ffff00;"><strong>&#62;</strong></span>

#   Pass Phrase Dialog:
#   Configure the pass phrase gathering process.
#   The filtering dialog program (`builtin' is a internal
#   terminal dialog) has to provide the pass phrase on stdout.
<span class="c4"><strong>SSLPassPhraseDialog</strong></span>  <span style="color:#ff40ff;"><strong>builtin</strong></span>

#   Inter-Process Session Cache:
#   Configure the SSL Session Cache: First the mechanism
#   to use and second the expiring timeout (in seconds).
#SSLSessionCache        none
#SSLSessionCache        shmht:/usr/local/dh/apache/logs/ssl_scache(512000)
#SSLSessionCache        shmcb:/usr/local/dh/apache/logs/ssl_scache(512000)
<span class="c4"><strong>SSLSessionCache</strong></span>         <span style="color:#ff40ff;"><strong>dbm:</strong></span>/usr/local/dh/apache/logs/ssl_scache
<span class="c4"><strong>SSLSessionCacheTimeout</strong></span>  300

#   Semaphore:
#   Configure the path to the mutual exclusion semaphore the
#   SSL engine uses internally for inter-process synchronization.
<span class="c4"><strong>SSLMutex</strong></span>  <span style="color:#ff40ff;"><strong>file:</strong></span>/usr/local/dh/apache/logs/ssl_mutex

#   Pseudo Random Number Generator (PRNG):
#   Configure one or more sources to seed the PRNG of the
#   SSL library. The seed data should be of good random quality.
#   WARNING! On some platforms /dev/random blocks if not enough entropy
#   is available. This means you then cannot use the /dev/random device
#   because it would lead to very long connection times (as long as
#   it requires to make more entropy available). But usually those
#   platforms additionally provide a /dev/urandom device which doesn't
#   block. So, if available, use this one instead. Read the mod_ssl User
#   Manual for more details.
<span class="c4"><strong>SSLRandomSeed</strong></span> startup <span style="color:#ff40ff;"><strong>builtin</strong></span>
<span class="c4"><strong>SSLRandomSeed</strong></span> connect <span style="color:#ff40ff;"><strong>builtin</strong></span>
#SSLRandomSeed startup file:/dev/random  512
#SSLRandomSeed startup file:/dev/urandom 512
#SSLRandomSeed connect file:/dev/random  512
#SSLRandomSeed connect file:/dev/urandom 512

#   Logging:
#   The home of the dedicated SSL protocol logfile. Errors are
#   additionally duplicated in the general error log file.  Put
#   this somewhere where it cannot be used for symlink attacks on
#   a real server (i.e. somewhere where only root can write).
#   Log levels are (ascending order: higher ones include lower ones):
#   none, error, warn, info, trace, debug.
<span class="c4"><strong>SSLLog</strong></span>      /usr/local/dh/apache/logs/ssl_engine_log
<span class="c4"><strong>SSLLogLevel</strong></span> <span style="color:#ff40ff;"><strong>info</strong></span>

<span style="color:#ffff00;"><strong>&#60;/IfModule&#62;</strong></span>

<span style="color:#ffff00;"><strong>&#60;IfDefine</strong></span><span style="color:#ff40ff;"><strong> SSL</strong></span><span style="color:#ffff00;"><strong>&#62;</strong></span>

##
## SSL Virtual Host Context
##

<span style="color:#ffff00;"><strong>&#60;VirtualHost</strong></span><span style="color:#ff40ff;"><strong> _default_:8443</strong></span><span style="color:#ffff00;"><strong>&#62;</strong></span>

#  General setup for the virtual host
<span class="c4"><strong>DocumentRoot</strong></span> <span style="color:#ff40ff;"><strong>"/usr/local/dh/apache/template/docs"</strong></span>
<span class="c4"><strong>ServerName</strong></span> hightower.sd.dreamhost.com
<span class="c4"><strong>ServerAdmin</strong></span> jeremy@hightower.sd.dreamhost.com
<span class="c4"><strong>ErrorLog</strong></span> /usr/local/dh/apache/logs/error_log
<span class="c4"><strong>TransferLog</strong></span> /usr/local/dh/apache/logs/access_log

#   SSL Engine Switch:
#   Enable/Disable SSL for this virtual host.
<span class="c4"><strong>SSLEngine</strong></span> <span style="color:#ff40ff;"><strong>on</strong></span>

#   SSL Cipher Suite:
#   List the ciphers that the client is permitted to negotiate.
#   See the mod_ssl documentation for a complete list.
<span class="c4"><strong>SSLCipherSuite</strong></span> <span style="color:#ff40ff;"><strong>ALL</strong></span>:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:<span style="color:#ff40ff;"><strong>+SSLv2</strong></span>:+EXP:+eNULL

#   Server Certificate:
#   Point SSLCertificateFile at a PEM encoded certificate.  If
#   the certificate is encrypted, then you will be prompted for a
#   pass phrase.  Note that a kill -HUP will prompt again. A test
#   certificate can be generated with `make certificate' under
#   built time. Keep in mind that if you've both a RSA and a DSA
#   certificate you can configure both in parallel (to also allow
#   the use of DSA ciphers, etc.)
<span class="c4"><strong>SSLCertificateFile</strong></span> /usr/local/dh/apache/template/etc/ssl.crt/server.crt
#SSLCertificateFile /usr/local/dh/apache/template/etc/ssl.crt/server-dsa.crt

#   Server Private Key:
#   If the key is not combined with the certificate, use this
#   directive to point at the key file.  Keep in mind that if
#   you've both a RSA and a DSA private key you can configure
#   both in parallel (to also allow the use of DSA ciphers, etc.)
<span class="c4"><strong>SSLCertificateKeyFile</strong></span> /usr/local/dh/apache/template/etc/ssl.key/server.key
#SSLCertificateKeyFile /usr/local/dh/apache/template/etc/ssl.key/server-dsa.key

#   Server Certificate Chain:
#   Point SSLCertificateChainFile at a file containing the
#   concatenation of PEM encoded CA certificates which form the
#   certificate chain for the server certificate. Alternatively
#   the referenced file can be the same as SSLCertificateFile
#   when the CA certificates are directly appended to the server
#   certificate for convinience.
#SSLCertificateChainFile /usr/local/dh/apache/template/etc/ssl.crt/ca.crt

#   Certificate Authority (CA):
#   Set the CA certificate verification path where to find CA
#   certificates for client authentication or alternatively one
#   huge file containing all of them (file must be PEM encoded)
#   Note: Inside SSLCACertificatePath you need hash symlinks
#         to point to the certificate files. Use the provided
#         Makefile to update the hash symlinks after changes.
#SSLCACertificatePath /usr/local/dh/apache/template/etc/ssl.crt
#SSLCACertificateFile /usr/local/dh/apache/template/etc/ssl.crt/ca-bundle.crt

#   Certificate Revocation Lists (CRL):
#   Set the CA revocation path where to find CA CRLs for client
#   authentication or alternatively one huge file containing all
#   of them (file must be PEM encoded)
#   Note: Inside SSLCARevocationPath you need hash symlinks
#         to point to the certificate files. Use the provided
#         Makefile to update the hash symlinks after changes.
#SSLCARevocationPath /usr/local/dh/apache/template/etc/ssl.crl
#SSLCARevocationFile /usr/local/dh/apache/template/etc/ssl.crl/ca-bundle.crl

#   Client Authentication (Type):
#   Client certificate verification type and depth.  Types are
#   none, optional, require and optional_no_ca.  Depth is a
#   number which specifies how deeply to verify the certificate
#   issuer chain before deciding the certificate is not valid.
#SSLVerifyClient require
#SSLVerifyDepth  10

#   Access Control:
#   With SSLRequire you can do per-directory access control based
#   on arbitrary complex boolean expressions containing server
#   variable checks and other lookup directives.  The syntax is a
#   mixture between C and Perl.  See the mod_ssl documentation
#   for more details.
#&#60;Location /&#62;
#SSLRequire (    %{SSL_CIPHER} !~ m/^(EXP&#124;NULL)/ \
#            and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
#            and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
#            and %{TIME_WDAY} &#62;= 1 and %{TIME_WDAY} &#60;= 5 \
#            and %{TIME_HOUR} &#62;= 8 and %{TIME_HOUR} &#60;= 20       ) \
#           or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
#&#60;/Location&#62;

#   SSL Engine Options:
#   Set various options for the SSL engine.
#   o FakeBasicAuth:
#     Translate the client X.509 into a Basic Authorisation.  This means that
#     the standard Auth/DBMAuth methods can be used for access control.  The
#     user name is the `one line' version of the client's X.509 certificate.
#     Note that no password is obtained from the user. Every entry in the user
#     file needs this password: `xxj31ZMTZzkVA'.
#   o ExportCertData:
#     This exports two additional environment variables: SSL_CLIENT_CERT and
#     SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
#     server (always existing) and the client (only existing when client
#     authentication is used). This can be used to import the certificates
#     into CGI scripts.
#   o StdEnvVars:
#     This exports the standard SSL/TLS related `SSL_*' environment variables.
#     Per default this exportation is switched off for performance reasons,
#     because the extraction step is an expensive operation and is usually
#     useless for serving static content. So one usually enables the
#     exportation for CGI and SSI requests only.
#   o CompatEnvVars:
#     This exports obsolete environment variables for backward compatibility
#     to Apache-SSL 1.x, mod_ssl 2.0.x, Sioux 1.0 and Stronghold 2.x. Use this
#     to provide compatibility to existing CGI scripts.
#   o StrictRequire:
#     This denies access when "SSLRequireSSL" or "SSLRequire" applied even
#     under a "Satisfy any" situation, i.e. when it applies access is denied
#     and no other module can change it.
#   o OptRenegotiate:
#     This enables optimized SSL connection renegotiation handling when SSL
#     directives are used in per-directory context.
#SSLOptions +FakeBasicAuth +ExportCertData +CompatEnvVars +StrictRequire
<span style="color:#ffff00;"><strong>&#60;Files</strong></span><span style="color:#ff40ff;"><strong> ~ "\.(cgi&#124;shtml&#124;phtml&#124;php3?)$"</strong></span><span style="color:#ffff00;"><strong>&#62;</strong></span>
    <span class="c4"><strong>SSLOptions</strong></span> <span style="color:#ff40ff;"><strong>+StdEnvVars</strong></span>
<span style="color:#ffff00;"><strong>&#60;/Files&#62;</strong></span>
<span style="color:#ffff00;"><strong>&#60;Directory</strong></span><span style="color:#ff40ff;"><strong> "/usr/local/dh/web/cgi-bin"</strong></span><span style="color:#ffff00;"><strong>&#62;</strong></span>
    <span class="c4"><strong>SSLOptions</strong></span> <span style="color:#ff40ff;"><strong>+StdEnvVars</strong></span>
<span style="color:#ffff00;"><strong>&#60;/Directory&#62;</strong></span>

#   SSL Protocol Adjustments:
#   The safe and default but still SSL/TLS standard compliant shutdown
#   approach is that mod_ssl sends the close notify alert but doesn't wait for
#   the close notify alert from client. When you need a different shutdown
#   approach you can use one of the following variables:
#   o ssl-unclean-shutdown:
#     This forces an unclean shutdown when the connection is closed, i.e. no
#     SSL close notify alert is send or allowed to received.  This violates
#     the SSL/TLS standard but is needed for some brain-dead browsers. Use
#     this when you receive I/O errors because of the standard approach where
#     mod_ssl sends the close notify alert.
#   o ssl-accurate-shutdown:
#     This forces an accurate shutdown when the connection is closed, i.e. a
#     SSL close notify alert is send and mod_ssl waits for the close notify
#     alert of the client. This is 100% SSL/TLS standard compliant, but in
#     practice often causes hanging connections with brain-dead browsers. Use
#     this only for browsers where you know that their SSL implementation
#     works correctly.
#   Notice: Most problems of broken clients are also related to the HTTP
#   keep-alive facility, so you usually additionally want to disable
#   keep-alive for those clients, too. Use variable "nokeepalive" for this.
#   Similarly, one has to force some clients to use HTTP/1.0 to workaround
#   their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
#   "force-response-1.0" for this.
<span class="c4"><strong>SetEnvIf</strong></span> <span style="color:#ff40ff;"><strong>User</strong></span>-Agent <span style="color:#ff40ff;"><strong>".*MSIE.*"</strong></span> \
         nokeepalive ssl-unclean-shutdown \
         downgrade-1.0 force-response-1.0

#   Per-Server Logging:
#   The home of a custom SSL log file. Use this when you want a
#   compact non-error SSL logfile on a virtual host basis.
<span class="c4"><strong>CustomLog</strong></span> /usr/local/dh/apache/logs/ssl_request_log \
          <span style="color:#ff40ff;"><strong>"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"</strong></span>

<span style="color:#ffff00;"><strong>&#60;/VirtualHost&#62;</strong></span>

<span style="color:#ffff00;"><strong>&#60;/IfDefine&#62;</strong></span>

</span></pre>
]]></content:encoded>
</item>
<item>
<title><![CDATA[htaccess-file example]]></title>
<link>http://htaccess.wordpress.com/?p=53</link>
<pubDate>Tue, 12 Aug 2008 02:20:17 +0000</pubDate>
<dc:creator>htaccess</dc:creator>
<guid>http://htaccess.wordpress.com/?p=53</guid>
<description><![CDATA[
# Place a .htaccess file in each directory you want to protect.
###################################]]></description>
<content:encoded><![CDATA[<pre style="font-size:12px !important;background-color:#111111 !important;">
<span style="color:#00ffff;"><strong># Place a .htaccess file in each directory you want to protect.</strong></span>
<span style="color:#00ffff;"><strong>########################################################################</strong></span>
<span style="color:#00ffff;"><strong>#                    SECURITY / ACCESS CONTROL                         #</strong></span>
<span style="color:#00ffff;"><strong># If the web server's AllowOverride allows AUTHCONFIG to be overridden #</strong></span>
<span style="color:#00ffff;"><strong>########################################################################</strong></span>
<span style="color:#00ffff;"><strong>#</strong></span>
<span style="color:#00ffff;"><strong># Save both .htpasswd and .htgroup files in a directory above "documentroot" directory</strong></span>
<span style="color:#00ffff;"><strong># (e.g. not in or below /apache/htdocs) but could be below "serverroot" directory</strong></span>
<span style="color:#00ffff;"><strong># (e.g. below /apache).</strong></span>

<span style="color:#00ffff;"><strong># This will pop-up a user/password dialog box saying Realm = </strong></span>
<span style="color:#ffff00;">AuthName</span> <span style="color:#ff40ff;"><strong>"Restricted Area"</strong></span>

<span style="color:#00ffff;"><strong># AuthType is normally basic.  Not very secure until "Digest" type becomes prevalent</strong></span>
<span style="color:#ffff00;">AuthType</span> <span style="color:#ff40ff;"><strong>basic</strong></span>

<span style="color:#00ffff;"><strong># If value of AuthUserFile doesn't begin with a slash, it is treated as</strong></span>
<span style="color:#00ffff;"><strong># relative to the ServerRoot (not DocumentRoot!)</strong></span>
<span style="color:#ffff00;">AuthUserFile</span> <span style="color:#ff40ff;"><strong>"/userhome/blahBlah/.htpasswd"</strong></span>
<span style="color:#ffff00;">AuthGroupFile</span> <span style="color:#ff40ff;"><strong>"/userhome/blahBlah/.htgroup"</strong></span>

<span style="color:#00ffff;"><strong># Each line of the user file contains a username followed by a colon, followed by the crypt()</strong></span>
<span style="color:#00ffff;"><strong># encrypted password. The behavior of multiple occurrences of the same user is undefined. </strong></span>
<span style="color:#00ffff;"><strong># You can generate a password file on your system by typing commands on the OS prompt as follows:</strong></span>
<span style="color:#00ffff;"><strong>#    htpasswd -c Filename username     # Creates a password file 'Filename' with 'username'</strong></span>
<span style="color:#00ffff;"><strong>#                                      # as the first user. It will prompt for the new password.</strong></span>
<span style="color:#00ffff;"><strong>#    htpasswd Filename username2       # Adds or modifies in password file 'Filename' the 'username2'. </strong></span>
<span style="color:#00ffff;"><strong>#</strong></span>
<span style="color:#00ffff;"><strong># Each line of the group file contains a groupname followed by a colon, followed by </strong></span>
<span style="color:#00ffff;"><strong># the member usernames separated by spaces. For example, put this on one line in the .htgroup file:</strong></span>
<span style="color:#00ffff;"><strong># mygroup: bob joe anne</strong></span>

<span style="color:#00ffff;"># This set to off will forward a not-found userid to the next-in-line module for authentication.</span>
<span style="color:#00ffff;"># 'On' is the default It is better that way.</span>
<span style="color:#00ffff;">#AuthAuthoritative off</span>

<span style="color:#00ffff;"># Now, we allow specific users or groups to get in.</span>
<span style="color:#00ffff;"># require user joe john mary</span>
<span style="color:#ff40ff;">require</span> valid-<span style="color:#ff40ff;">user</span>
<span style="color:#ff40ff;">require</span> <span style="color:#ff40ff;">group</span> family friends

<span style="color:#00ffff;"># More Authentication related, rarely used </span>
<span style="color:#00ffff;"># AuthDBGroupFile </span>
<span style="color:#00ffff;"># AuthDBUserFile </span>
<span style="color:#00ffff;"># AuthDBAuthoritative </span>
<span style="color:#00ffff;"># AuthDBMGroupFile </span>
<span style="color:#00ffff;"># AuthDBMUserFile </span>
<span style="color:#00ffff;"># AuthDBMAuthoritative </span>
<span style="color:#00ffff;"># AuthDigestFile </span>
<span style="color:#00ffff;"># AuthDigestGroupFile </span>
<span style="color:#00ffff;"># AuthDigestQop </span>
<span style="color:#00ffff;"># AuthDigestNonceLifetime </span>
<span style="color:#00ffff;"># AuthDigestNonceFormat </span>
<span style="color:#00ffff;"># AuthDigestNcCheck </span>
<span style="color:#00ffff;"># AuthDigestAlgorithm </span>
<span style="color:#00ffff;"># AuthDigestDomain </span>
<span style="color:#00ffff;"># Using Digest Authentication</span>

<span style="color:#00ffff;">###############################################################################</span>
<span style="color:#00ffff;"># From here on, if something is not working as you might expect, try to make sure that </span>
<span style="color:#00ffff;"># the corresponding AllowOverride is enabled in ,  or  sections</span>
<span style="color:#00ffff;"># of server configuarion files (generally httpd.conf, can be access.conf or srm.conf).</span>
<span style="color:#00ffff;"># Allowoverride could be:</span>
<span style="color:#00ffff;"># 1. AuthConfig (allows AuthName, AuthUserFile, require etc. in .htaccess file)</span>
<span style="color:#00ffff;"># 2. FileInfo (allows AddType, DefaultType, ErrorDocument etc. in .htaccess file) </span>
<span style="color:#00ffff;"># 3. Indexes (allows DirectoryIndex, FancyIndexing, IndexOptions etc. in .htaccess file) </span>
<span style="color:#00ffff;"># 4. Limit (allows use of allow, deny and order directives which control access by host)</span>
<span style="color:#00ffff;"># 5. Options (allows use of options directive in .htaccess file - see below)</span>
<span style="color:#00ffff;"># 6. All (allows all of the above in .htaccess file.  Rare)</span>
<span style="color:#00ffff;"># 7. None (allows none of the above in .htaccess file.  Rare)</span>
<span style="color:#00ffff;"># Usually, AuthConfig is allowed.  Rest is up to the particular web host company.</span>
<span style="color:#00ffff;">#</span>
<span style="color:#00ffff;"># If you get server errors after putting this file in, try disabling</span>
<span style="color:#00ffff;"># each section below one-by-one to see what your web hosting company</span>
<span style="color:#00ffff;"># allows (or you can ask them :)</span>
<span style="color:#00ffff;">###############################################################################</span>

<span style="color:#00ffff;">######################################################################</span>
<span style="color:#00ffff;"># If the web server's AllowOverride allows FILEINFO to be overridden #</span>
<span style="color:#00ffff;">######################################################################</span>
<span style="color:#00ffff;"># CookieTracking, AddType, DefaultType, AddHandler, Action, ErrorDocument</span>
<span style="color:#00ffff;"># Redirect, Redirectmatch, RedirectPermanent, RedirectTemp</span>
<span style="color:#00ffff;"># AddEncoding, AddCharset, AddLanguage, LanguagePriority, DefaultLanguage</span>

<span style="color:#00ffff;">#### Comment it out if UserTrack module is not loaded in the server</span>
<span style="color:#00ffff;">#CookieName "woiqatty"</span>
<span style="color:#00ffff;">#CookieTracking on</span>

<span style="color:#00ffff;"># Tweak mime.types without actually editing it, or make certain files to be certain types.</span>
<span style="color:#00ffff;">#AddType application/x-httpd-php3 .phtml</span>
<span style="color:#ffff00;">AddType</span> application/x-httpd-php3 .php
<span style="color:#ffff00;">AddType</span> application/x-httpd-php3 .php3
<span style="color:#ffff00;">AddType</span> application/x-httpd-php3-source .phps
<span style="color:#ffff00;">AddType</span> application/x-tar .tgz

<span style="color:#00ffff;"># In this directory, default filetype is this one if Server cannot</span>
<span style="color:#00ffff;"># otherwise determine from filename extensions.</span>
<span style="color:#00ffff;"># Mostly text or HTML - "text/plain", gif images - "image/gif", </span>
<span style="color:#00ffff;"># compiled porgrams - "application/octet-stream"</span>
<span style="color:#ffff00;">DefaultType</span> text/plain
<span style="color:#00ffff;"># DefaultType image/gif</span>
<span style="color:#00ffff;"># DefaultType  application/octet-stream</span>

<span style="color:#00ffff;">################### THIS IS IMPORTANT! #####################</span>
<span style="color:#00ffff;"># AddHandler allows you to map certain file extensions to "handlers",</span>
<span style="color:#00ffff;"># actions unrelated to filetype. These can be either built into the server</span>
<span style="color:#00ffff;"># or added with the Action command (see below).</span>
<span style="color:#00ffff;"># If you want to use server side includes, or CGI outside</span>
<span style="color:#00ffff;"># ScriptAliased directories, uncomment the following lines.</span>

<span style="color:#00ffff;"># To use CGI scripts:</span>
<span style="color:#ffff00;">AddHandler</span> cgi-<span style="color:#ffff00;">script</span> cgi pl

<span style="color:#00ffff;"># To use server-parsed HTML files</span>
<span style="color:#ffff00;">AddType</span> text/html .shtml
<span style="color:#ffff00;">AddHandler</span> server-parsed .shtml

<span style="color:#00ffff;"># Example of a file whose contents are sent as is so as to tell the client that a file has redirected. </span>
<span style="color:#00ffff;">#</span>
<span style="color:#00ffff;"># Server always adds a Date: and Server: header to the data returned to the client, </span>
<span style="color:#00ffff;"># so don't include these in the file.</span>
<span style="color:#00ffff;">#AddHandler send-as-is asis</span>

<span style="color:#00ffff;"># If you wish to use server-parsed imagemap files, use</span>
<span style="color:#ffff00;">AddHandler</span> imap-file <span style="color:#ff40ff;">map</span>

<span style="color:#00ffff;"># For content negotiation use</span>
<span style="color:#00ffff;">#AddHandler type-map var</span>

<span style="color:#00ffff;"># Action lets you define media types that will execute a script whenever</span>
<span style="color:#00ffff;"># a matching file is called. This eliminates the need for repeated URL</span>
<span style="color:#00ffff;"># pathnames for oft-used CGI file processors.</span>
<span style="color:#00ffff;"># Format: Action action-type cgi-script</span>
<span style="color:#00ffff;"># Format: Action media/type /cgi-script/location</span>
<span style="color:#00ffff;"># Format: Action handler-name /cgi-script/location</span>
<span style="color:#00ffff;">#Action cgi-script /cgi-bin/default.cgi</span>

<span style="color:#00ffff;"># Redirect [status] ABSOLUTE-path-of-old-url new-url.  Default status is temp.</span>
<span style="color:#00ffff;"># Status is one of permanent (returns 301), temp (returns 302), </span>
<span style="color:#00ffff;"># seeother (returns 303, see other document in same place), </span>
<span style="color:#00ffff;"># gone (returns 410, no longer available at all) - Don't specify new-URL</span>
<span style="color:#00ffff;"># Here, if the client requests <a href="http://myserver/service/foo.txt">http://myserver/service/foo.txt</a>, it will be told </span>
<span style="color:#00ffff;"># to access <a href="http://foo2.bar.com/service/foo.txt">http://foo2.bar.com/service/foo.txt</a> instead. </span>
<span style="color:#00ffff;">#Redirect /service <a href="http://foo2.bar.com/service">http://foo2.bar.com/service</a></span>
</pre>
<pre style="font-size:12px !important;background-color:#111111 !important;">
<span style="color:#00ffff;"># Customizable error response.  Three styles:</span>
<span style="color:#00ffff;"># 1. Plain Text - the (") marks it as text, it does not get output</span>
<span style="color:#00ffff;">#ErrorDocument 500 "The server made a boo boo.</span>
<span style="color:#00ffff;"># 2. Local Redirects - e.g. To redirect to local URL /missing.html</span>
<span style="color:#00ffff;">#ErrorDocument 404 /missing.html</span>
<span style="color:#00ffff;">#ErrorDocument 404 /cgi-bin/missing_handler.pl</span>
<span style="color:#00ffff;"># 3. External Redirects (All env. variables don't go to the redirected location)</span>
<span style="color:#00ffff;">#ErrorDocument 402 <a href="http://some.other_server.com/subscription_info.html">http://some.other_server.com/subscription_info.html</a></span>

<span style="color:#00ffff;"># Mosaic/X 2.1+ browsers can uncompress information on the fly</span>
<span style="color:#ffff00;">AddEncoding</span> x-compress Z
<span style="color:#ffff00;">AddEncoding</span> x-gzip gz tgz

<span style="color:#00ffff;">#Content negotiation directives</span>
<span style="color:#00ffff;">#AddLanguage fr .fr</span>
<span style="color:#00ffff;"># Just list the languages in decreasing order of preference.</span>
<span style="color:#ffff00;">LanguagePriority</span> en fr it

<span style="color:#00ffff;"><strong>######################################################################</strong></span>
<span style="color:#00ffff;"><strong># If the web server's AllowOverride allows INDEXES to be overridden  #</strong></span>
<span style="color:#00ffff;"><strong>######################################################################</strong></span>
<span style="color:#00ffff;"><strong># DirectoryIndex, ExpiresActive, ExpiresByType, ExpiresDefault</strong></span>
<span style="color:#00ffff;"><strong># ImapBase, ImapDefault, ImapMenu</strong></span>
<span style="color:#00ffff;"><strong># FancyIndexing, IndexOptions, IndexOrderDefault, IndexIgnore, HeaderName, ReadmeName</strong></span>
<span style="color:#00ffff;"><strong># AddDescription, AddAlt, AddAltByEncoding, AddAltByType</strong></span>
<span style="color:#00ffff;"><strong># AddIcon, AddIconByEncoding, AddIconByType, DefaultIcon</strong></span>

<span style="color:#00ffff;"><strong># Default file to send to the client if none specified.  </strong></span>
<span style="color:#00ffff;"><strong># Separate multiple entries with spaces.</strong></span>
<span style="color:#00ffff;"><strong># If none of these files exists in a directory, a directory listing may</strong></span>
<span style="color:#00ffff;"><strong># be returned depending on Options Indexes setting.</strong></span>
<span style="color:#ffff00;">DirectoryIndex</span> index.html index.htm index.shtml index.php index.php3 index.pl index.cgi /cgi-bin/index.cgi

<span style="color:#00ffff;"><strong># Must enable expirations to use other expire directives</strong></span>
<span style="color:#00ffff;"><strong>#ExpiresActive on</strong></span>
<span style="color:#00ffff;"><strong># 'M' means that the file's last modification time should be used as the base time</strong></span>
<span style="color:#00ffff;"><strong># 'A' means the client's access time should be used as base time</strong></span>
<span style="color:#00ffff;"><strong>#ExpiresDefault M604800</strong></span>
<span style="color:#00ffff;"><strong># Expire GIF images after a month in the client's cache</strong></span>
<span style="color:#00ffff;"><strong>#ExpiresByType image/gif A2592000  </strong></span>
<span style="color:#00ffff;"><strong># HTML documents are good for a week from the time they were changed, period     </strong></span>
<span style="color:#00ffff;"><strong>#ExpiresByType text/html M604800  </strong></span>
<span style="color:#00ffff;"><strong>#ExpiresByType text/html "access plus 1 month 15 days 2 hours" </strong></span>
<span style="color:#00ffff;"><strong>#ExpiresDefault "modification plus 5 hours 3 minutes" </strong></span>
<span style="color:#00ffff;"><strong>#ExpiresByType text/html "now plus 1 month 15 days 2 hours"</strong></span>

<span style="color:#00ffff;"><strong># ImapMenu can be none, formatted, semiformatted, unformatted</strong></span>
<span style="color:#ffff00;">ImapMenu</span> <span style="color:#ff40ff;"><strong>semiformatted</strong></span>
<span style="color:#00ffff;"><strong># ImapDefault can be error, nocontent, map, referer, or some useful URL.</strong></span>
<span style="color:#00ffff;"><strong>#  The .map file overrides this.</strong></span>
<span style="color:#ffff00;">ImapDefault</span> <span style="color:#ff40ff;"><strong>map</strong></span>
<span style="color:#00ffff;"><strong># ImapBase can be map, referer, URL.  The .map file overrides this.</strong></span>
<span style="color:#ffff00;">ImapBase</span> <span style="color:#ff40ff;"><strong>referer</strong></span>

<span style="color:#00ffff;"><strong>############## THIS HERE IS </strong></span><span style="background-color:#00ffff;"><span style="color:#808080;">NOT</span></span><span style="color:#00ffff;"><strong> TOO IMPORTANT! ###################</strong></span>
<span style="color:#00ffff;"><strong># Apache version dependent.  If Options indexes is allowed, Server will behave as follows:</strong></span>
<span style="color:#00ffff;"><strong>#IndexOptions FancyIndexing FoldersFirst NameWidth=* DescriptionWidth=*</strong></span>
<span style="color:#00ffff;"><strong>#IndexOptions FancyIndexing NameWidth=*</strong></span>
<span style="color:#00ffff;"><strong>#IndexOptions +IconHeight=20 +IconWidth=20 +IconsAreLinks</strong></span>
<span style="color:#00ffff;"><strong>#IndexOptions +ScanHTMLTitles</strong></span>
<span style="color:#00ffff;"><strong>#IndexOptions +SuppressColumnSorting </strong></span>
<span style="color:#00ffff;"><strong>#IndexOptions +SuppressDescription </strong></span>
<span style="color:#00ffff;"><strong>#IndexOptions +SuppressLastModified </strong></span>
<span style="color:#00ffff;"><strong>#IndexOptions +SuppressSize </strong></span>
<span style="color:#00ffff;"><strong>#IndexOptions SuppressHTMLPreamble</strong></span>
<span style="color:#00ffff;"><strong># Sort by Name, Date, Size, or Description? Default is name.</strong></span>
<span style="color:#00ffff;"><strong>#IndexOrderDefault Ascending Name</strong></span>
<span style="color:#00ffff;"><strong># Don't list these files</strong></span>
<span style="color:#00ffff;"><strong>#IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t</strong></span>

<span style="color:#00ffff;"><strong># Server .conf should already have set these up.  You should only set</strong></span>
<span style="color:#00ffff;"><strong># the missing ones in .htaccess files (if you ever find out)</strong></span>
<span style="color:#00ffff;"><strong>#AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip</strong></span>
<span style="color:#00ffff;"><strong>#AddIconByType (TXT,/icons/text.gif) text/*</strong></span>
<span style="color:#00ffff;"><strong>#AddIconByType (IMG,/icons/image2.gif) image/*</strong></span>
<span style="color:#00ffff;"><strong>#AddIcon /icons/binary.gif .bin .exe</strong></span>
<span style="color:#00ffff;"><strong>#AddIcon /icons/text.gif .txt</strong></span>
<span style="color:#00ffff;"><strong>#AddIcon /icons/uuencoded.gif .uu</strong></span>
<span style="color:#00ffff;"><strong>#AddIcon /icons/hand.right.gif README</strong></span>
<span style="color:#00ffff;"><strong>#AddIcon /icons/folder.gif ^^DIRECTORY^^</strong></span>
<span style="color:#00ffff;"><strong>#AddIcon /icons/blank.gif ^^BLANKICON^^</strong></span>
<span style="color:#00ffff;"><strong># If no file type matches..</strong></span>
<span style="color:#00ffff;"><strong>#DefaultIcon /icons/unknown.gif</strong></span>
<span style="color:#00ffff;"><strong>#AddDescription "GZIP compressed document" .gz</strong></span>
<span style="color:#ffff00;">AddDescription</span> <span style="color:#ff40ff;"><strong>"Java class file"</strong></span> .class
<span style="color:#ffff00;">AddDescription</span> <span style="color:#ff40ff;"><strong>"Java source file"</strong></span> .java
<span style="color:#ffff00;">AddDescription</span> <span style="color:#ff40ff;"><strong>"Java Server Pages source file"</strong></span> .jsp
<span style="color:#00ffff;"><strong># Server writes the contents of HeaderName file before the directory listing by adding .html or .txt to the specified name.</strong></span>
<span style="color:#00ffff;"><strong># Server writes the contents of ReadmeName after the directory listing.</strong></span>
<span style="color:#00ffff;"><strong># The server looks for the-specified-name.html, then the-specified-name.txt</strong></span>
<span style="color:#ffff00;">ReadmeName</span> README
<span style="color:#ffff00;">HeaderName</span> <span style="color:#ffff00;">HEADER</span>
<span style="color:#00ffff;"><strong>############## END OF </strong></span><span style="background-color:#00ffff;"><span style="color:#808080;">NOT</span></span><span style="color:#00ffff;"><strong>-TOO-IMPORTANT ###################</strong></span>

<span style="color:#00ffff;"><strong>######################################################################</strong></span>
<span style="color:#00ffff;"><strong># If the web server's AllowOverride allows LIMIT to be overridden    #</strong></span>
<span style="color:#00ffff;"><strong>######################################################################</strong></span>
<span style="color:#00ffff;"><strong># order, allow from, deny from, allow from env, deny from env</strong></span>

<span style="color:#00ffff;"><strong># Controls which domain name or computer host client can get stuff from this server.  </strong></span>
<span style="color:#00ffff;"><strong># No space between allow and deny in order (just comma).  allow from all is default</strong></span>
<span style="color:#00ffff;"><strong>#order allow,deny</strong></span>
<span style="color:#00ffff;"><strong>#deny from all</strong></span>
<span style="color:#00ffff;"><strong>#deny from www.yahoo.com</strong></span>
<span style="color:#00ffff;"><strong>#allow from www.yahoo.com</strong></span>
<span style="color:#00ffff;"><strong># The allow from env directive controls access to a directory by the existence</strong></span>
<span style="color:#00ffff;"><strong># (or non-existence) of an environment variable. Example: </strong></span>
<span style="color:#00ffff;"><strong># BrowserMatch ^KnockKnock/2.0 let_me_in</strong></span>
<span style="color:#00ffff;"><strong># </strong></span>
<span style="color:#00ffff;"><strong>#     order deny,allow</strong></span>
<span style="color:#00ffff;"><strong>#     deny from all</strong></span>
<span style="color:#00ffff;"><strong>#     allow from env=let_me_in</strong></span>
<span style="color:#00ffff;"><strong># </strong></span>
</pre>
<pre style="font-size:12px !important;background-color:#111111 !important;">
<span style="color:#00ffff;"><strong>######################################################################</strong></span>
<span style="color:#00ffff;"><strong># If the web server's AllowOverride allows OPTIONS to be overridden  #</strong></span>
<span style="color:#00ffff;"><strong>######################################################################</strong></span>
<span style="color:#00ffff;"><strong># Options, XBitHack, CheckSpelling, Example - in order of importance</strong></span>

<span style="color:#00ffff;"><strong># Options:</strong></span>
<span style="color:#00ffff;"><strong># ExecCGI - Execution of CGI scripts is permitted</strong></span>
<span style="color:#00ffff;"><strong># FollowSymLinks - Server will follow symbolic links in this directory</strong></span>
<span style="color:#00ffff;"><strong># SymLinksIfOwnerMatch - Server follows sym links if target file/dir owned by the same user id as the link</strong></span>
<span style="color:#00ffff;"><strong># Includes - Server-side includes are permitted</strong></span>
<span style="color:#00ffff;"><strong># IncludesNOEXEC - Server-side includes permitted, #exec and #include of CGI scripts are disabled</strong></span>
<span style="color:#00ffff;"><strong># Indexes - Lists directory if no index file is found</strong></span>
<span style="color:#00ffff;"><strong># MultiViews - Content negotiated MultiViews are allowed. </strong></span>
<span style="color:#00ffff;"><strong># Note that "MultiViews" must be named *explicitly* --- "Options All" doesn't give it to you.</strong></span>
<span style="color:#00ffff;"><strong># This here resets any previous settings</strong></span>
<span style="color:#00ffff;"><strong># Options IncludesNOEXEC MultiViews</strong></span>
<span style="color:#ffff00;">Options</span> <span style="color:#ff40ff;"><strong>Includes</strong></span> <span style="color:#ff40ff;"><strong>MultiViews</strong></span>
<span style="color:#00ffff;"><strong># Or, add/subtract from prior options</strong></span>
<span style="color:#00ffff;"><strong>#Options +Indexes -Includes</strong></span>
<span style="color:#00ffff;"><strong># To disable execution of SSI and CGI in this directory</strong></span>
<span style="color:#00ffff;"><strong>#Options -Includes -IncludesNOEXEC -ExecCGI</strong></span>

<span style="color:#00ffff;"><strong># Checks "user" execute permission on file.  If yes, executes it as SSI.</strong></span>
<span style="color:#00ffff;"><strong># Then, no need for special file extension .shtml</strong></span>
<span style="color:#ffff00;">XBitHack</span> <span style="color:#ff40ff;"><strong>on</strong></span>

<span style="color:#00ffff;"><strong># Matches document(s) if maximum one spelling mistake</strong></span>
<span style="color:#00ffff;"><strong># CheckSpelling  on</strong></span>

<span style="color:#00ffff;"><strong>#Example directive is Apache API related for Apache programmers</strong></span>

<span style="color:#00ffff;">######################################################################</span>
<span style="color:#00ffff;"># The following do not depend on AllowOverride setting at all        #</span>
<span style="color:#00ffff;"># These are either always available or need a loaded module          #</span>
<span style="color:#00ffff;">######################################################################</span>
<span style="color:#00ffff;"># Generally available:</span>
<span style="color:#00ffff;"># Satisfy, ServerSignature, LimitRequestBody</span>
<span style="color:#00ffff;">#  ... ,  ... </span>
<span style="color:#00ffff;">#  ... ,  ... </span>
<span style="color:#00ffff;">#  ... ,  ... </span>
<span style="color:#00ffff;"># ForceType, SetHandler, RemoveHandler, AddDefaultCharset</span>
<span style="color:#00ffff;"># Optionally installed modules:</span>
<span style="color:#00ffff;"># CookieName, Header</span>

<span style="color:#00ffff;"># Satisfy any is used to password restrict an area, but to let clients from particular</span>
<span style="color:#00ffff;"># addresses as defined in 'allow from' to get in without prompting for a password. Default is "all"</span>
<span style="color:#00ffff;">#Satisfy any</span>

<span style="color:#00ffff;"># Access control by file name in a directory where .htaccess file is placed:</span>
<span style="color:#00ffff;"># The following lines prevent .htaccess files from being viewed by</span>
<span style="color:#00ffff;"># Web clients.  Since .htaccess files often contain authorization</span>
<span style="color:#00ffff;"># information, access is disallowed for security reasons.  Comment</span>
<span style="color:#00ffff;"># these lines out if you want Web visitors to see the contents of</span>
<span style="color:#00ffff;"># .htaccess files.  If you change the AccessFileName directive above,</span>
<span style="color:#00ffff;"># be sure to make the corresponding changes here.</span>

<span style="color:#ff6060;">    order </span><span style="color:#ff40ff;">allow</span><span style="color:#ff6060;">,</span><span style="color:#ff40ff;">deny</span>
    <span style="color:#8080ff;">deny from </span><span style="color:#ffff00;">all</span>

<span style="color:#00ffff;"># Can use reg exp  instead of line below.</span>
<span style="color:#00ffff;">#</span>
<span style="color:#00ffff;">#       order allow,deny</span>
<span style="color:#00ffff;">#       allow from all</span>
<span style="color:#00ffff;">#</span>

<span style="color:#00ffff;"># Optionally add a line containing the server version and virtual host</span>
<span style="color:#00ffff;"># name to server-generated pages (error documents, FTP directory listings,</span>
<span style="color:#00ffff;"># mod_status and mod_info output etc., but not CGI generated documents).</span>
<span style="color:#00ffff;"># Set to "EMail" to also include a mailto: link to the ServerAdmin.</span>
<span style="color:#00ffff;">#ServerSignature On</span>
<span style="color:#00ffff;">#ServerSignature EMail</span>

<span style="color:#00ffff;"><strong># Specify cookie name to be used if CookieTracking is set to on.  Needs mod_usertrack installed.</strong></span>
<span style="color:#00ffff;"><strong># I specify this up in FileInfo overriding</strong></span>
<span style="color:#00ffff;"><strong># CookieName "woiqatty"</strong></span>

<span style="color:#00ffff;"><strong># To control denial-of-service attacks</strong></span>
<span style="color:#ffff00;">LimitRequestBody</span> 3000000

<span style="color:#00ffff;"><strong># For documents served through this directory, modify headers as follows:</strong></span>
<span style="color:#00ffff;"><strong># Can also be set, add.  Mod_header not generally available.</strong></span>
<span style="color:#00ffff;"><strong>#Header append Author "V. Singla"   </strong></span>
<span style="color:#00ffff;"><strong>#Header unset Author</strong></span>

<span style="color:#00ffff;"><strong>################# For Apache Windows version only ######################</strong></span>

<span style="color:#00ffff;"><strong># use this to specify whether Apache should search windows registry</strong></span>
<span style="color:#00ffff;"><strong># or the #! line of the called script itself for interpreter name and location.</strong></span>
<span style="color:#00ffff;"><strong>#ScriptInterpreterSource script</strong></span>
<span style="color:#00ffff;"><strong># Tries to match the called file's extension in registry (e.g. search registry for .pl or .cgi)</strong></span>
<span style="color:#00ffff;"><strong>#ScriptInterpreterSource registry</strong></span>

<span style="color:#00ffff;"><strong>############ END OF .htaccess FILE #############</strong></span>

<span style="color:#8080ff;">

</span><a title=".htaccess tips, tricks, tutorials, guides" href="http://www.askapache.com/htaccess/">.htaccess examples</a>
</pre>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Apache mod_auth_digest authentication]]></title>
<link>http://htpasswd.wordpress.com/2008/08/12/apache-mod_auth_digest-authentication/</link>
<pubDate>Tue, 12 Aug 2008 01:48:16 +0000</pubDate>
<dc:creator>htaccess</dc:creator>
<guid>http://htpasswd.wordpress.com/2008/08/12/apache-mod_auth_digest-authentication/</guid>
<description><![CDATA[Digest authentication is described in RFC 2617.
Directives
# AuthDBGroupFile 
# AuthDBUserFile 
# Au]]></description>
<content:encoded><![CDATA[<blockquote><p>Digest authentication is described in <a href="http://rfc.askapache.com/rfc2617/">RFC 2617</a>.</p>
<p>Directives</p>
<h3><span style="color:#333399;"># AuthDBGroupFile </span></h3>
<h3><span style="color:#333399;"># AuthDBUserFile </span></h3>
<h3><span style="color:#333399;"># AuthDBAuthoritative </span></h3>
<h3><span style="color:#333399;"># AuthDBMGroupFile </span></h3>
<h3><span style="color:#333399;"># AuthDBMUserFile </span></h3>
<h3><span style="color:#333399;"># AuthDBMAuthoritative </span></h3>
<h3><span style="color:#333399;"># AuthDigestFile </span></h3>
<h3><span style="color:#333399;"># AuthDigestGroupFile </span></h3>
<h3><span style="color:#333399;"># AuthDigestQop </span></h3>
<h3><span style="color:#333399;"># AuthDigestNonceLifetime </span></h3>
<h3><span style="color:#333399;"># AuthDigestNonceFormat </span></h3>
<h3><span style="color:#333399;"># AuthDigestNcCheck </span></h3>
<h3><span style="color:#333399;"># AuthDigestAlgorithm </span></h3>
<h3><span style="color:#333399;"># AuthDigestDomain </span></h3>
<h3><span style="color:#333399;"># Using Digest Authentication</span></h3>
<p>Using Digest Authentication</p>
<p>Using MD5 Digest authentication is very simple. Simply set up authentication normally, using "AuthType Digest" and "AuthDigestFile" instead of the normal "AuthType Basic" and "AuthUserFile"; also, replace any "AuthGroupFile" with "AuthDigestGroupFile". Then add a "AuthDigestDomain" directive containing at least the root URI(s) for this protection space. Example:</p>
<pre>AuthType Digest</pre>
<pre>AuthName "private area"</pre>
<pre>AuthDigestDomain /private/ http://mirror.my.dom/private2/</pre>
<pre>AuthDigestFile /web/auth/.digest_pw
Require valid-user</pre>
<p>Note: Digest authentication is more secure than Basic authentication, but only works with supporting browsers. As of September 2004, major browsers that support digest authentication include Amaya, Konqueror, MS Internet Explorer for Mac OS X and Windows (although the Windows version fails when used with a query string -- see "Working with MS Internet Explorer" below for a workaround), Mozilla, Netscape 7, Opera, and Safari. lynx does not support digest authentication. Since digest authentication is not as widely implemented as basic authentication, you should use it only in environments where all users will have supporting browsers.</p>
<p><cite><a href="http://httpd.apache.org/docs/1.3/mod/mod_auth_digest.html">Apache module mod_auth_digest</a></cite></p></blockquote>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Hardening WordPress with .htaccess]]></title>
<link>http://htaccess.wordpress.com/?p=51</link>
<pubDate>Mon, 11 Aug 2008 16:56:47 +0000</pubDate>
<dc:creator>htaccess</dc:creator>
<guid>http://htaccess.wordpress.com/?p=51</guid>
<description><![CDATA[



AskApache WordPress Hardening Plugin
Filed Under (Plugin Reviews,  WordPress) by DK on 7 August ]]></description>
<content:encoded><![CDATA[<blockquote>
<div class="item_class_title">
<div class="item_class_title_text">
<div class="titles">
<div class="top_title"><a title="Permanent Link to AskApache WordPress Hardening Plugin" rel="bookmark" href="http://blogsecurity.net/wordpress/askapache-wordpress-hardening-plugin/">AskApache WordPress Hardening Plugin</a></div>
<div class="end_title">Filed Under (<a title="View all posts in Plugin Reviews" rel="category tag" href="http://blogsecurity.net/category/wordpress/plugin-reviews/">Plugin Reviews</a>,  <a title="View all posts in WordPress" rel="category tag" href="http://blogsecurity.net/category/wordpress/">WordPress</a>) by <a href="http://withdk.com/">DK</a> on 7 August 2008</div>
</div>
</div>
</div>
<div class="item_class_text">
<p>BlogSecurity released a popular article last year titled <a href="http://blogsecurity.net/wordpress/article-210607/">"Hardening WordPress with htaccess"</a>. It provided basic, yet effective techniques to harden a WordPress blog install.</p>
<p>Using Apache’s mod_rewrite allows us to perform basic filtering and application firewalling. AskApache is pushing mod_rewrite boundaries to the limits with a cool <a href="http://www.askapache.com/htaccess/htaccess-plugin-blocks-spam-hackers-and-password-protects-blog.html">plugin that will allow automated anti-hack/spam htaccess rules.</a></p>
<p>The plugin looks like a great tool for the more tech-savvy blog user. I say tech-savvy because the plugin requires tweaking on upgrades and may require adjustments specific to your needs, however an interesting project to keep an eye on nonetheless. My personal approach would be to utilise <a href="http://blogsecurity.net/wordpress/modsecurity-and-wordpress-defense-in-depth/">ModSecurity</a> which is much more powerful then mod_rewrite and which can be applied at the web server layer rather then having to have custom rules for each WordPress install.</div>
</blockquote>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Basic Apache Hardening in SLES 10 ]]></title>
<link>http://thebackroomtech.wordpress.com/?p=527</link>
<pubDate>Mon, 04 Aug 2008 12:09:27 +0000</pubDate>
<dc:creator>Julie</dc:creator>
<guid>http://thebackroomtech.wordpress.com/?p=527</guid>
<description><![CDATA[I setup a SuSE Enterprise Linux (SLES) 10 SP2 web server last week, and wanted to do some basic hard]]></description>
<content:encoded><![CDATA[<p><span style="font-size:small;font-family:Verdana;">I setup a SuSE Enterprise Linux (SLES) 10 SP2 web server last week, and wanted to do some basic hardening of the default Apache configuration.  Here's what I did.</span></p>
<ol>
<li><span style="font-size:small;font-family:Verdana;">edit /etc/apache2/httpd.conf</span></li>
<li><span style="font-size:small;font-family:Verdana;">Add <span style="color:#ff0000;">RewriteEngine On</span></span></li>
<li><span style="font-size:small;font-family:Verdana;">Add <span style="color:#ff0000;">RewriteLogLevel 2</span></span></li>
<li><span style="font-size:small;font-family:Verdana;">Add <span style="color:#ff0000;">RewriteLog /var/log/apache2/rewrite.log</span></span></li>
<li><span style="font-size:small;font-family:Verdana;">Add <span style="color:#ff0000;">ServerSignature Off<br />
<span style="color:#000000;">The ServerSignature directive allows the configuration of a trailing footer line under server-generated documents</span></span></span></li>
<li><span style="font-size:small;font-family:Verdana;">Add <span style="color:#ff0000;">ServerTokens Prod<br />
<span style="color:#000000;">This directive controls whether Server response header field which is sent back to clients includes a description of the generic OS-type of the server as well as information about compiled-in modules</span></span></span></li>
<li><span style="font-size:small;font-family:Verdana;">Add <span style="color:#ff0000;">ErrorDocument 500 “Internal server error” <span style="color:#000000;">to return a generic error message when http 500 error occurs</span></span></span></li>
<li><span style="font-size:small;font-family:Verdana;">Add <span style="color:#ff0000;">ErrorDocument 404 “An unknown error occurred, please try again later”</span>  (http 404 = not found)</span></li>
<li><span style="font-size:small;font-family:Verdana;">Add <span style="color:#ff0000;">ErrorDocument 403 “An unknown error occurred, please try again later”</span>    (http 403 = forbidden) </span></li>
<li><span style="font-size:small;font-family:Verdana;">Save – exit httpd.conf</span></li>
<li><span style="font-size:small;color:#ff0000;font-family:Verdana;">touch /var/log/apache2/rewrite.log <span style="color:#000000;">to create the rewrite.log file</span></span></li>
<li><span style="font-size:small;color:#ff0000;font-family:Verdana;">touch /srv/www/htdocs/.htaccess <span style="color:#000000;">to create the .htaccess file</span></span></li>
<li><span style="font-size:small;font-family:Verdana;">Edit the /srv/www/htdocs/.htaccess file</span></li>
<li><span style="font-size:small;font-family:Verdana;">Add <span style="color:#ff0000;">Options +FollowSymLinks</span><span style="color:#ff0000;"> –MultiViews<br />
<span style="color:#000000;">Note: FollowSymLinks must be set to + for rewrite to work!</span></span></span></li>
<li><span style="font-size:small;font-family:Verdana;">Add rewrite rules appropriate for your environment.  I'm using some rules that can be found in the Pauldotcom Security Weekly <a href="http://www.pauldotcom.com/wiki/index.php/Episode94" target="_blank">episode #94 show notes</a>, which were based on a <a href="http://www.0x000000.com/index.php?i=473" target="_blank">post</a> by nullbyte.</span></li>
<li><span style="font-size:small;font-family:Verdana;">Save – exit .htaccess</span></li>
<li><span style="font-size:small;font-family:Verdana;">YaST – Network Services – HTTP Server</span></li>
<li><span style="font-size:small;font-family:Verdana;">Server Modules tab – rewrite – toggle status to enabled - finish</span></li>
<li><span style="font-size:small;font-family:Verdana;">From a terminal run: <em>SuSEconfig</em></span></li>
<li><span style="font-size:small;font-family:Verdana;">From a terminal run: <em>/etc/init.d/apache2 restart</em></span></li>
<li><span style="font-size:small;font-family:Verdana;">With a web browser, try to access a page on the server that does not exist, ie  <a href="http://lnx2/nothere.html" target="_blank">http://server/nothere.html</a></span></li>
<li><span style="font-size:small;font-family:Verdana;">View the  /var/log/apache2/rewrite.log <br />
You should see the attempt logged</span></li>
</ol>
]]></content:encoded>
</item>
<item>
<title><![CDATA[htaccess não funciona no ubuntu meu arquivo htaccess não está sendo lido pelo apache]]></title>
<link>http://littleoak.wordpress.com/?p=126</link>
<pubDate>Sun, 27 Jul 2008 03:25:49 +0000</pubDate>
<dc:creator>littleoak</dc:creator>
<guid>http://littleoak.wordpress.com/?p=126</guid>
<description><![CDATA[Calma gente, nada de pânico, nada de gritos e nem sequer stress, o cara que faz isto por você est]]></description>
<content:encoded><![CDATA[<p>Calma gente, nada de pânico, nada de gritos e nem sequer stress, o cara que faz isto por você está aqui!</p>
<p><strong>Realidade<br />
</strong></p>
<p>Ter o apache instalado no ubuntu por meio de apt-get ou aptitude, ter um arquivo htaccess dentro do diretório público e o mesmo não estar sendo lido.</p>
<p><strong>Saída</strong></p>
<p>Como sempre, lá vai a coisa "mastigadinha":</p>
<p>1 - Acesse o diretório das configurações do apache referente aos virtual hosts, ou seja -&#62; /etc/apache2/sites-available/</p>
<p>2 - Assim que chegar lá, acesse o arquivo referente ao seu site, no caso do meu foi o amigo Default, ele tinha um conteúdo semelhante a:</p>
<p>NameVirtualHost *<br />
&#60;VirtualHost *&#62;<br />
ServerAdmin webmaster@localhost</p>
<p>DocumentRoot /var/www/<br />
&#60;Directory /&#62;<br />
Options FollowSymLinks<br />
AllowOverride None<br />
&#60;/Directory&#62;<br />
&#60;Directory /var/www/&#62;<br />
Options Indexes FollowSymLinks MultiViews<br />
AllowOverride None<br />
Order allow,deny<br />
allow from all<br />
&#60;/Directory&#62;</p>
<p>ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/<br />
&#60;Directory "/usr/lib/cgi-bin"&#62;<br />
AllowOverride None<br />
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch<br />
Order allow,deny<br />
Allow from all<br />
&#60;/Directory&#62;</p>
<p>ErrorLog /var/log/apache2/error.log</p>
<p># Possible values include: debug, info, notice, warn, error, crit,<br />
# alert, emerg.<br />
LogLevel warn</p>
<p>CustomLog /var/log/apache2/access.log combined<br />
ServerSignature On</p>
<p>Alias /doc/ "/usr/share/doc/"<br />
&#60;Directory "/usr/share/doc/"&#62;<br />
Options Indexes MultiViews FollowSymLinks<br />
AllowOverride None<br />
Order deny,allow<br />
Deny from all<br />
Allow from 127.0.0.0/255.0.0.0 ::1/128<br />
&#60;/Directory&#62;</p>
<p>&#60;/VirtualHost&#62;</p>
<p>############################</p>
<p>Para corrigir a coisa altere somente os trechos como abaixo:</p>
<p>NameVirtualHost *<br />
&#60;VirtualHost *&#62;<br />
ServerAdmin webmaster@localhost</p>
<p>DocumentRoot /var/www/<br />
&#60;Directory /&#62;<br />
Options FollowSymLinks Indexes<br />
<strong> AllowOverride AuthConfig</strong><br />
&#60;/Directory&#62;<br />
&#60;Directory /var/www/&#62;<br />
Options Indexes FollowSymLinks MultiViews<br />
<strong>AllowOverride AuthConfig</strong><br />
Order allow,deny<br />
allow from all<br />
&#60;/Directory&#62;</p>
<p>####################################################</p>
<p>Pronto, feito isto a coisa vai funcionar Beleza!</p>
<p>Acesse -&#62; <a href="http://www.tinews.info">http://www.tinews.info</a> e fique extremamente informado na área de TI.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Gérer les erreurs HTTP avec htaccess (400, 401, 403, 404 et 500)]]></title>
<link>http://juliengabryelewicz.wordpress.com/?p=77</link>
<pubDate>Fri, 25 Jul 2008 21:50:38 +0000</pubDate>
<dc:creator>Julien Gabryelewicz</dc:creator>
<guid>http://juliengabryelewicz.wordpress.com/?p=77</guid>
<description><![CDATA[Il est possible de rediriger les erreurs de votre visiteurs (adresse inconnue, Accés refusé ou aut]]></description>
<content:encoded><![CDATA[<p>Il est possible de rediriger les erreurs de votre visiteurs (adresse inconnue, Accés refusé ou autre) grâce à htaccess.</p>
<p>Voici la manoeuvre à effectuer :</p>
<p>- Créez un fichier htaccess (nommez un fichier texte htaccess puis vous le renommerez .htaccess lorsque vous enregistrez).</p>
<p>- Créez une page html quelqconque. (Ici, nous l'appelerons 404.html).</p>
<p>- Vous pouvez mettre ce que vous voulez dans la page 404.html</p>
<p>- Voici ce qu'il y a à écrire maintenant dans le fichier htaccess :</p>
<p> <span style="color:#ff0000;"># ErrorDocument</span></p>
<p><span style="color:#ff0000;">ErrorDocument 404 404.html</span></p>
<p><span style="color:#000000;">Lorsque que l'utilisateur effectuera une erreur 404, il sera redirigé sur la page 404.html</span></p>
<p>A la place de 404, vous pouvez mettre d'autres nombres. Voici la liste des erreurs les plus répandues :</p>
<p><strong><span style="text-decoration:underline;">Erreur 400 :</span></strong> La syntaxe de la requête est erronée.</p>
<p><strong><span style="text-decoration:underline;">Erreur 401 :</span></strong> Accès à la ressource refusé.</p>
<p><strong><span style="text-decoration:underline;">Erreur 403 :</span></strong> Refus de traîtement de la requête.</p>
<p><strong><span style="text-decoration:underline;">Erreur 404 :</span></strong> Document non trouvé.</p>
<p><strong><span style="text-decoration:underline;">Erreur 500 :</span></strong> Erreur interne du serveur</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[URLs]]></title>
<link>http://orqi.wordpress.com/?p=36</link>
<pubDate>Thu, 24 Jul 2008 09:20:25 +0000</pubDate>
<dc:creator>orqi</dc:creator>
<guid>http://orqi.wordpress.com/?p=36</guid>
<description><![CDATA[A typical Orqi url will look something like this with mod_rewrite enabled ..
http://telephotos.co.uk]]></description>
<content:encoded><![CDATA[<p><!--more-->A typical Orqi url will look something like this with mod_rewrite enabled ..<br />
<a href="http://telephotos.co.uk/photo/latest.html" target="_blank_">http://telephotos.co.uk/photo/latest.html</a></p>
<p>... or like this with mod_rewrite disabled<br />
<a href="http://telephotos.co.uk/index.php?object=photo&#38;action=latest" target="_blank_">http://telephotos.co.uk/index.php?object=photo&#38;action=latest</a></p>
<p>Note that they both go to the same page. What is happening is the Orqi Loader is receiving the object and action parameters and then using them to look for a controller. First it will look in your nominated "_classes/_app" folder, then it will look in your nominated "_orqi/_app" folder for a default controller. If it can't find one then an error is returned to the screen of the ilk "Error: Class PhotoController not found."</p>
<p>The object parameter is the name of the controller and action is the name of the function in the controller. In the example above, this means Orqi will be looking to execute a function called "Latest" in a class called "PhotoController" which is in a file called "PhotoController.php".</p>
<h3>Enable mod_rewrite</h3>
<p>If you look in the config.php file you will notice a line like this ...</p>
<p>[sourcecode language='php']$this->app['mod_rewrite'] = true;[/sourcecode]</p>
<p>Set it to true to enable the nicer URL writing. Orqi will also produce nice URLs in functions like Controller::MakeLink()</p>
<p><em>NB:</em> You MUST have the mod_rewrite module loaded on your webserver</p>
<h3>.htaccess</h3>
<p>Here is like the most basic .htaccess file you can get away with. It's here where the urls are redirected from "/niceurl/mycommand.html" to "/index.php?object=aargh&#38;action=horridurl".</p>
<p>[sourcecode language='cpp']<br />
RewriteEngine on<br />
RewriteRule ^pages/(.*).html$ index.php?object=page&action=view&id=$1&%{QUERY_STRING} [L]<br />
RewriteRule ^(.*)/(.*).html$ index.php?object=$1&action=$2&%{QUERY_STRING} [L]<br />
[/sourcecode]</p>
<h3>The File Extensions</h3>
<p>If you want to change the url extensions in your urls just look for the following line in your config.php.  The file extension in your config file must agree with the file extensions in your .htaccess file.</p>
<p><em>(My advice is leave it as html. I was using .orqi for a while before I realised it was an SEO suicide move)</em></p>
<p>[sourcecode language='php']$this->app['extension'] = 'html';[/sourcecode]</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[SSL Encrypted Logins for WordPress]]></title>
<link>http://htpasswd.wordpress.com/?p=20</link>
<pubDate>Wed, 16 Jul 2008 17:58:24 +0000</pubDate>
<dc:creator>htaccess</dc:creator>
<guid>http://htpasswd.wordpress.com/?p=20</guid>
<description><![CDATA[Awesome post by Ryan on the changes in the usage of SSL and cookies in WordPress.  As we&#8217;ll s]]></description>
<content:encoded><![CDATA[<div class="posttitle">Awesome post by Ryan on the changes in the usage of SSL and cookies in WordPress.  As we'll see soon, this will effect your htpasswd and htaccess setups if you are using SSL.</div>
<div class="posttitle"></div>
<div class="posttitle"></div>
<div class="posttitle">
<blockquote>
<h2><a title="Permanent Link to SSL and Cookies in WordPress 2.6" rel="bookmark" href="http://boren.nu/archives/2008/07/14/ssl-and-cookies-in-wordpress-26/">SSL and Cookies in WordPress 2.6</a></h2>
<p class="post-info">Mon Jul 14 2008 by <a title="Posts by Ryan" href="http://boren.nu/archives/author/ryan/">Ryan</a></p>
<p>If your host supports SSL, WordPress 2.6 enables you to make use of that support in a secure manner.  Enjoy, and help us make SSL support better by <a href="http://codex.wordpress.org/Reporting_Bugs">reporting any bugs you find</a>.</p></blockquote>
</div>
<p>The auth cookie, on the other hand, is delivered only for the admin area and can be used to make changes to the blog.  If you login via https, your auth cookie will be delivered only for SSL sessions.  If you login over https and later visit your admin via regular http, you will have to log in again to get a non-SSL auth cookie. By default, you have the option of visiting your admin either via http or https.  If you want to force all admin sessions to be over https, add the following to your wp-config.php:</p>
<blockquote><p>define(’FORCE_SSL_ADMIN’, true);</p></blockquote>
<p>This will prevent non-SSL logins to your blog. This means you will never have an auth cookie delivered in the clear.  If you want to force logins to be over SSL to prevent usernames and passwords from being sent in the clear while letting your users have the choice of using http or https when visiting the admin, add this to your wp-config.php:</p>
<blockquote><p>define(’FORCE_SSL_LOGIN’, true);</p></blockquote>
<p>This does not force all cookies to be delivered over SSL.  The user has a choice between the greater security of an https session and the greater speed of an http session.  If you want to remove this choice and force secure https sessions, FORCE_SSL_ADMIN is for you.</p>
<p>With these new cookies comes new secret keys for signing them.  Recall that WordPress 2.5 <a href="http://boren.nu/archives/2008/04/24/cookie-security-in-wordpress-25/">introduced SECRET_KEY</a> as a means of adding a little extra security to cookie signing.  If you intend to use the SSL support in 2.6, you will probably want to define the secret key for the secure cookie.  If you don’t intend to use SSL, you can stick with your existing SECRET_KEY.  Here’s an example of what the new secret key definitions look like:</p>
<blockquote><p>define(’AUTH_KEY’, ‘put your unique phrase here’);<br />
define(’SECURE_AUTH_KEY’, ‘put your unique phrase here’);<br />
define(’LOGGED_IN_KEY’, ‘put your unique phrase here’);</p></blockquote>
<p>You should change those sample phrases to unique, preferably random phrases.  Each key should have a different phrase.  Visit <a href="http://api.wordpress.org/secret-key/1.1/">http://api.wordpress.org/secret-key/1.1/</a> to get a set of random keys that you can cut-and-paste into your wp-config.php.  Once again, if you don’t intend to use SSL, you can stick with the SECRET_KEY you already have.</p>
<p>This should be mostly transparent to plugins and themes. I say mostly because there are some themes that send POST and AJAX requests to files within the themes directory.  The auth cookies are delivered only to the wp-admin and wp-content/plugins directories, so files directly loaded from wp-content/themes will not see the cookies.  Themes should send their POST and AJAX re