summaryrefslogtreecommitdiff
path: root/apache2/conf-available/local-cgit.conf
diff options
context:
space:
mode:
Diffstat (limited to 'apache2/conf-available/local-cgit.conf')
-rw-r--r--apache2/conf-available/local-cgit.conf27
1 files changed, 27 insertions, 0 deletions
diff --git a/apache2/conf-available/local-cgit.conf b/apache2/conf-available/local-cgit.conf
new file mode 100644
index 0000000..100720c
--- /dev/null
+++ b/apache2/conf-available/local-cgit.conf
@@ -0,0 +1,27 @@
+AddDefaultCharset UTF-8
+
+<Directory /srv/git>
+ Options None
+ AllowOverride None
+ Require all granted
+</Directory>
+
+<Directory /usr/lib/cgit>
+ Options ExecCgi FollowSymLinks
+ AllowOverride None
+ Require all granted
+</Directory>
+
+
+<Directory /usr/share/cgit>
+ Options None
+ AllowOverride None
+ Require all granted
+</Directory>
+
+RewriteEngine on
+
+RewriteRule ^/(cgit-css/)?(cgit\.(css|png)|favicon\.ico|robots.txt)$ /usr/share/cgit/$2 [last]
+
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteRule ^(/.*)?$ /usr/lib/cgit/cgit.cgi$1 [T=application/x-httpd-cgi,L,NS]