Add fossil CGI documentation

This commit is contained in:
Anthony Rose 2024-05-21 09:13:37 +01:00
parent b6eb47d59a
commit 01cf37d204

21
docs/fossil-cgi.txt Normal file
View file

@ -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.