From fc5392a49b2913b467ecf7b733ba24a6538b7eea Mon Sep 17 00:00:00 2001 From: René Neumann Date: Mon, 1 Oct 2012 14:57:53 +0200 Subject: CGit update --- www-apps/cgit/files/postinstall-en.txt | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'www-apps/cgit/files/postinstall-en.txt') diff --git a/www-apps/cgit/files/postinstall-en.txt b/www-apps/cgit/files/postinstall-en.txt index 94280c8..b164123 100644 --- a/www-apps/cgit/files/postinstall-en.txt +++ b/www-apps/cgit/files/postinstall-en.txt @@ -13,3 +13,33 @@ Then add "include=/etc/cgit-repos" in /etc/cgitrc. This way it's simpler and more convenient. You won't need to update your cgitrc every time you add a new repository. +=============================================================================== + Apache HowTo +=============================================================================== + +With a default apache vhost config you can now access your repository at +http:///cgi-bin/cgit.cgi/ + +If you wish to access your repository starting from the root and don't want +'cgi-bin/cgit.cgi' to be invisible, 2 things are needed. + +In your apache vhost configuration file for your domain, add the following +rewrite rules to your +/htdocs> section. + + RewriteEngine On + # Redirect all non-existant urls to cgit + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteRule ^.* /cgi-bin/cgit.cgi/$0 [L,PT] + + # Redirect the empty url to cgit + RewriteRule ^$ /cgi-bin/cgit.cgi/ [L,PT] + + +To make cgit create the correct URL's internally add to /etc/cgitrc (or your +local config file) +Enable virtual-root=/ + +After these rules, you can now access cgit via http:/// to get the +listing, and http:///repository to go directly to repository. -- cgit v1.2.3-54-g00ecf