From 01cf37d204d6f90b4f6650b7ed59f45db46ed779 Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Tue, 21 May 2024 09:13:37 +0100 Subject: [PATCH] Add fossil CGI documentation --- docs/fossil-cgi.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 docs/fossil-cgi.txt 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.