# 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
AllowOverride None
Order allow,deny
Allow from all
## 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/
#
# Options FollowSymlinks ExecCGI
# Allow from All
#
#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:
ServerName cgit.my.domain
SetEnv CGIT_CONFIG /etc/cgitrc
Options FollowSymlinks ExecCGI
DirectoryIndex cgit.cgi
DocumentRoot /var/www/cgi-bin
Options ExecCGI
Allow from All
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /cgit.cgi?url=$1 [L,QSA]