2011-07-03 19:39:37 +02:00
|
|
|
# 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
|
|
|
|
|
2013-11-25 03:17:01 +01:00
|
|
|
<Directory @DOCROOT@/cgi-bin>
|
2011-07-03 19:39:37 +02:00
|
|
|
AllowOverride None
|
2013-11-25 03:17:01 +01:00
|
|
|
Require all granted
|
2011-07-03 19:39:37 +02:00
|
|
|
</Directory>
|
|
|
|
|
|
|
|
## Version 1 (default): under /cgi-bin/cgit.cgi address
|
2013-11-25 03:17:01 +01:00
|
|
|
#ScriptAlias /cgi-bin/cgit.cgi @DOCROOT@/cgi-bin/cgit.cgi
|
|
|
|
#Alias /cgit/ @DOCROOT@/cgi-bin/
|
2011-07-03 19:39:37 +02:00
|
|
|
#<Location /cgit/cgit.cgi>
|
|
|
|
# Options FollowSymlinks ExecCGI
|
2013-11-25 03:17:01 +01:00
|
|
|
# Require all granted
|
2011-07-03 19:39:37 +02:00
|
|
|
#</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
|
2013-11-25 03:17:01 +01:00
|
|
|
DocumentRoot @DOCROOT@/cgi-bin
|
2011-07-03 19:39:37 +02:00
|
|
|
<Location />
|
|
|
|
Options ExecCGI
|
2013-11-25 03:17:01 +01:00
|
|
|
Require all granted
|
2011-07-03 19:39:37 +02:00
|
|
|
</Location>
|
|
|
|
RewriteEngine on
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-d
|
|
|
|
RewriteRule ^(.*)$ /cgit.cgi?url=$1 [L,QSA]
|
|
|
|
</VirtualHost>
|