<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>DomTool/WhyNoHtaccess</title><revhistory><revision><revnumber>4</revnumber><date>2008-07-07 04:27:49</date><authorinitials>localhost</authorinitials><revremark>converted to 1.6 markup</revremark></revision><revision><revnumber>3</revnumber><date>2008-04-30 15:16:08</date><authorinitials>AdamChlipala</authorinitials><revremark>deleuze -&gt; hcoop</revremark></revision><revision><revnumber>2</revnumber><date>2008-04-09 00:24:21</date><authorinitials>MichaelOlson</authorinitials><revremark>Make subpag</revremark></revision><revision><revnumber>1</revnumber><date>2008-04-08 00:24:52</date><authorinitials>AdamChlipala</authorinitials></revision></revhistory></articleinfo><para>One common way of configuring Apache web sites is through &quot;<code>.htaccess</code> files,&quot; which are files stored among your regular web site content that specify new configuration to override Apache's defaults.  HCoop doesn't support <code>.htaccess</code> files for security reasons.  Certain directives can break other people's web sites when used improperly or maliciously.  This includes some of the most common directives found in <code>.htaccess</code> files, like <code>RewriteRule</code>.  With the right flags, you can set up a proxying rewrite from Apache to itself, creating an infinite loop that quickly eats up all available Apache processes, disabling Apache for everyone. </para><para>Instead, you can configure your web sites using <ulink url="https://wiki.hcoop.net/DomTool/WhyNoHtaccess/DomTool#">DomTool</ulink>, as shown on <ulink url="https://wiki.hcoop.net/DomTool/WhyNoHtaccess/DomTool/Examples#">DomTool/Examples</ulink>.  All of the most common Apache directives have <ulink url="https://wiki.hcoop.net/DomTool/WhyNoHtaccess/DomTool#">DomTool</ulink> counterparts, and we can add counterparts to unsupported Apache directives on request.  Crucially, <ulink url="https://wiki.hcoop.net/DomTool/WhyNoHtaccess/DomTool#">DomTool</ulink> validates all configuration you request before letting Apache see it.  For instance, <ulink url="https://wiki.hcoop.net/DomTool/WhyNoHtaccess/DomTool#">DomTool</ulink> won't allow you to use <code>rewriteRule</code> directives with the proxy flag <code>P</code>. </para><para>It can certainly be a pain to learn <ulink url="https://wiki.hcoop.net/DomTool/WhyNoHtaccess/DomTool#">DomTool</ulink> when you're used to Apache's configuration language, but we believe that the <ulink url="https://wiki.hcoop.net/DomTool/WhyNoHtaccess/DomTool#">DomTool</ulink> language is objectively superior to Apache's language.  <ulink url="https://wiki.hcoop.net/DomTool/WhyNoHtaccess/DomTool#">DomTool</ulink> can also be used to control a host of different daemons, not just Apache, in a uniform way.  Every Apache directive has arbitrary syntactic conventions that you need to learn by reading prose documentation.  In contrast, by learning <ulink url="https://wiki.hcoop.net/DomTool/WhyNoHtaccess/DomTool#">DomTool</ulink>'s type system, you become able to understand how to use any directive just by looking at its type, which can be found in <ulink url="http://hcoop.net/domtool/">the standard library reference</ulink>.  We don't expect most members to take the time to learn the type system, but we promise that it's worth doing. </para><para><emphasis role="strong">Afterword</emphasis>: The suggestion of allowing <code>.htaccess</code> files that use directives from a carefully-vetted whitelist has come up before.  Somehow it's never gotten anywhere.  Anyone is welcome to post suggestions on exactly how this could/should be done on the <code>hcoop-sysadmin</code> list. </para></article>