summaryrefslogtreecommitdiff
path: root/development/cgit/config/cgit-httpd.conf
diff options
context:
space:
mode:
Diffstat (limited to 'development/cgit/config/cgit-httpd.conf')
-rw-r--r--development/cgit/config/cgit-httpd.conf44
1 files changed, 44 insertions, 0 deletions
diff --git a/development/cgit/config/cgit-httpd.conf b/development/cgit/config/cgit-httpd.conf
new file mode 100644
index 0000000000..a579174fd0
--- /dev/null
+++ b/development/cgit/config/cgit-httpd.conf
@@ -0,0 +1,44 @@
+# sample folder and virtual host configurations for httpd.
+# edit, move it to /etc/httpd/extra and include it in
+# /etc/httpd/httpd.conf with a line
+#
+# Include /etc/httpd/extra/cgit-httpd.conf
+#
+# uncomment also the line
+#
+# AddHandler cgi-script .cgi
+
+<Directory /var/www/cgi-bin>
+ AllowOverride None
+ Order allow,deny
+ Allow from all
+</Directory>
+
+## Version 1 (default): under /cgi-bin/cgit.cgi address
+#ScriptAlias /cgi-bin/cgit.cgi /var/www/cgi-bin/cgit.cgi
+#Alias /cgit/ /var/www/cgi-bin/
+#<Location /cgit/cgit.cgi>
+# Options FollowSymlinks ExecCGI
+# Allow from All
+#</Location>
+#RewriteEngine on
+#RewriteCond %{REQUEST_FILENAME} !-f
+#RewriteCond %{REQUEST_FILENAME} !-d
+#RewriteRule ^/cgit/(.*)$ /cgit/cgit.cgi?url=$1 [L,QSA]
+
+# Version 2: cgit as a handler to whole vhost:
+<VirtualHost *:80>
+ ServerName cgit.my.domain
+ SetEnv CGIT_CONFIG /etc/cgitrc
+ Options FollowSymlinks ExecCGI
+ DirectoryIndex cgit.cgi
+ DocumentRoot /var/www/cgi-bin
+ <Location />
+ Options ExecCGI
+ Allow from All
+ </Location>
+ RewriteEngine on
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteRule ^(.*)$ /cgit.cgi?url=$1 [L,QSA]
+</VirtualHost>