diff --git a/docs/fossil-cgi.txt b/docs/fossil-cgi.txt new file mode 100644 index 0000000..340584d --- /dev/null +++ b/docs/fossil-cgi.txt @@ -0,0 +1,21 @@ +Fossil as a CGI server +====================== + +Create the following CGI file in /usr/lib/cgi-bin/fossil: + + #!/usr/local/bin/fossil + directory: /srv/fossil + repolist + setenv: SCRIPT_NAME + +This should be executable, and CGI should be enabled in Apache with the +`a2enmod cgi` command. + +Edit the Apache configuration to add the following lines: + + RewriteEngine on + RewriteCond %{REQUEST_URI} "!^/cgi-bin/.*$" + RewriteCond %{REQUEST_URI} "!^/robots\.txt$" + RewriteRule "^/(.*)$" "/cgi-bin/fossil/$1" [NC,PT] + +This will allow the fossil site to be served from the site root.