diff options
author | Matteo Bernardini <ponce@slackbuilds.org> | 2020-04-21 08:41:55 +0200 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2020-04-24 08:19:00 +0700 |
commit | 7ea6df2d64d730bd7792911d1391ad3119802bc5 (patch) | |
tree | 52cfcd3585936003ef367194933c0edff5bbe5a4 /development/cgit/config | |
parent | 9911242a747547e52b99459f46233e8b5a4dac3e (diff) |
development/cgit: Updated for version 1.2.3.
Rewrote the example configurations for apache
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/cgit/config')
-rw-r--r-- | development/cgit/config/cgit-httpd.conf | 73 | ||||
-rw-r--r-- | development/cgit/config/cgitrc.sample | 8 |
2 files changed, 51 insertions, 30 deletions
diff --git a/development/cgit/config/cgit-httpd.conf b/development/cgit/config/cgit-httpd.conf index 4d713503bed32..4b757ea04961c 100644 --- a/development/cgit/config/cgit-httpd.conf +++ b/development/cgit/config/cgit-httpd.conf @@ -1,43 +1,62 @@ -# sample folder and virtual host configurations for httpd. +# 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 +# Include /etc/httpd/extra/cgit.conf # # uncomment also the line # # AddHandler cgi-script .cgi +# +# and enable mod_cgi (or mod_cgid, depending on your apache +# configuration) + +## Version 1: cgit in a /cgit subdirectory of the main host +## This will need the following 3 lines in your /etc/cgitrc +## +## virtual-root=/cgit/ +## css=/static/cgit.css +## logo=/static/cgit.png +## +#Alias /static/cgit.css "@DOCROOT@/cgi-bin/cgit.css" +#Alias /static/cgit.png "@DOCROOT@/cgi-bin/cgit.png" +#ScriptAlias /cgit/ "@DOCROOT@/cgi-bin/cgit.cgi/" +#RedirectMatch ^/cgit$ /cgit/ +#<Directory "@DOCROOT@/cgi-bin/"> +# AllowOverride None +# Options ExecCGI FollowSymlinks +# Require all granted +#</Directory> -<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: +# Version 2: cgit as a handler to whole vhost +# Thanks to Robby Workman for this elegant example <VirtualHost *:80> - ServerName cgit.my.domain + ServerName cgit.yourdomain.ltd + + Options FollowSymlinks + SetEnv CGIT_CONFIG /etc/cgitrc - Options FollowSymlinks ExecCGI - DirectoryIndex cgit.cgi + DocumentRoot @DOCROOT@/cgi-bin + + <Directory @DOCROOT@/cgi-bin> + AllowOverride None + Require all granted + DirectoryIndex cgit.cgi + </Directory> + + Alias /cgit.css @DOCROOT@/cgi-bin/cgit.css + Alias /cgit.png @DOCROOT@/cgi-bin/cgit.png + Alias /favicon.ico @DOCROOT@/cgi-bin/favicon.ico + Alias /robots.txt @DOCROOT@/cgi-bin/robots.txt + Alias / @DOCROOT@/cgi-bin/cgit.cgi/ + <Location /> Options ExecCGI Require all granted </Location> - RewriteEngine on - RewriteCond %{REQUEST_FILENAME} !-f - RewriteCond %{REQUEST_FILENAME} !-d - RewriteRule ^(.*)$ /cgit.cgi?url=$1 [L,QSA] + + <Files cgit.cgi> + SetHandler cgi-script + </Files> </VirtualHost> diff --git a/development/cgit/config/cgitrc.sample b/development/cgit/config/cgitrc.sample index cd23168d04355..31d7708333c90 100644 --- a/development/cgit/config/cgitrc.sample +++ b/development/cgit/config/cgitrc.sample @@ -8,11 +8,13 @@ virtual-root=/ snapshots=tar.gz branch-sort=age # for this to work you have to build cgit against lua -# and install luacrypto too +# and install luacrypto too. +# you wull have also to add email-gravatar-sbo-additions.css +# at the bottom of your installed cgit.css email-filter=lua:/usr/share/cgit/filters/email-gravatar-sbo.lua -#css=/static/cgit.css -#logo=/static/cgit.png +#css=/cgit.css +#logo=/cgit.png # repository specific data repo.url=slackbuilds |