slackbuilds_ponce/development/cgit/config/cgit-httpd.conf
Robby Workman 1d048cb81c development/cgit: Fixes for httpd-2.4.x and allow custom DOCROOT
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
2013-11-25 14:08:19 -06:00

43 lines
1.2 KiB
Text

# 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 @DOCROOT@/cgi-bin>
AllowOverride None
Require all granted
</Directory>
## Version 1 (default): under /cgi-bin/cgit.cgi address
#ScriptAlias /cgi-bin/cgit.cgi @DOCROOT@/cgi-bin/cgit.cgi
#Alias /cgit/ @DOCROOT@/cgi-bin/
#<Location /cgit/cgit.cgi>
# Options FollowSymlinks ExecCGI
# Require all granted
#</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 @DOCROOT@/cgi-bin
<Location />
Options ExecCGI
Require all granted
</Location>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /cgit.cgi?url=$1 [L,QSA]
</VirtualHost>