summaryrefslogtreecommitdiff
path: root/apache2.conf
diff options
context:
space:
mode:
Diffstat (limited to 'apache2.conf')
-rw-r--r--apache2.conf9
1 files changed, 6 insertions, 3 deletions
diff --git a/apache2.conf b/apache2.conf
index 030bac1..12a4e24 100644
--- a/apache2.conf
+++ b/apache2.conf
@@ -183,15 +183,18 @@
# Enable user-dirs
UserDir public_html
- # Enable cgitrc at /projects/cgit
+ # Enable cgitrc at /projects/cgit.cgi
SetEnv CGIT_CONFIG /srv/www/spragg-ssl.co.uk/cgitrc
- ScriptAlias /projects/cgit/ "/usr/lib/cgit/cgit.cgi/"
- RedirectMatch ^/projects/cgit$ /projects/cgit/
+ ScriptAlias /projects/cgit.cgi/ "/usr/lib/cgit/cgit.cgi/"
+ RedirectMatch ^/(.*)/cgit.cgi$ "/$1/cgit.cgi/"
<Directory "/usr/lib/cgit/">
AllowOverride None
Options ExecCGI FollowSymlinks
Require all granted
</Directory>
+ # Redirect for old links.
+ RewriteRule "^/projects/cgit$" "/projects/cgit.cgi/" [R,L]
+ RewriteRule "^/projects/cgit/(.*)" "/projects/cgit.cgi/$1" [R,L]
# Enable the STAG trac instance over WSGI
#WSGIScriptAlias /c/STAG/trac /srv/www/spragg-ssl.co.uk/html/c/STAG/trac/cgi-bin/trac.wsgi