aboutsummaryrefslogtreecommitdiff
path: root/development/cgit/config/cgit-httpd.conf
blob: a579174fd066633fb47bf3efb568b40abe13f0e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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>