Changes To Cookbook
Not logged in
@@ -54,10 +54,50 @@
 <font color="#a52a2a">17 </font>&nbsp;&nbsp;<font color="#a52a2a"><b>done</b></font><br>
 <font color="#a52a2a">18 </font><font color="#a52a2a"><b>else</b></font><br>
 <font color="#a52a2a">19 </font>&nbsp;&nbsp;sudo <font color="#a020f0">$0</font>&nbsp;<font color="#a020f0">$*</font><br>
 <font color="#a52a2a">20 </font><font color="#a52a2a"><b>fi</b></font><br>
 </font></nowiki>
+
+The following <cite>apache2</cite> configuration can be used to run the root of a URL with fossil, but still allow other services / documents to be reached via specific URLs. Replace "code.autonomo.us" with your site's name and "dclark@pobox.com" with your email.
+
+<verbatim>
+NameVirtualHost *:80
+<VirtualHost *:80>
+    ServerName code.autonomo.us
+    ServerAdmin dclark@pobox.com
+    ErrorLog /var/log/apache2/code.autonomo.us-error.log
+    LogLevel warn
+    CustomLog /var/log/apache2/code.autonomo.us-access.log combined
+    ServerSignature On
+
+    DocumentRoot /var/www/
+
+    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
+    <Directory "/usr/lib/cgi-bin">
+        AllowOverride None
+        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
+        Order allow,deny
+        Allow from all
+    </Directory>
+
+    # Fossil SCM at root of web site (http://example.com) configuration...
+    RewriteEngine On
+    # RewriteCond - One for every URL we don't want Fossil SCM to serve. In the
+    #               example, requests that go to the /var/www/tmp directory and
+    #               the /usr/lib/cgi-bin directoty are ignored by Fossil SCM.
+    RewriteCond %{REQUEST_URI} !^/tmp/.*$
+    RewriteCond %{REQUEST_URI} !^/cgi-bin/.*$
+    RewriteRule ^(.*)$ /usr/lib/cgi-bin/code.autonomo.us/$1 [T=application/x-httpd-cgi]
+</VirtualHost>
+</verbatim>
+
+/usr/lib/cgi-bin/code.autonomo.us is just a standard fossil CGI file; it looks like this:
+
+<verbatim>
+#!/usr/bin/fossil
+repository: /srv/fossil-scm/code.autonomo.us.fossil-scm
+</verbatim>
 
 <h4>Windows</h4>
 <p>While it is far from a perfect set of instructions.. here are some quick notes that should help windows users along the way...</p>
 <ul>
 <li>you need fossil.exe accessible by your web server or on your path.. easiest is to just chuck it in \%SYSTEM_ROOT%\ (usually c:\windows\) </li>