Currently cgit, after running webapp-config outputs very little usefull information. Most webapp ebuilds get you started pretty well. This one, lacks any usefull example apache configuration to start with (i'm still working on finding a working configuration for using: webapp-config -I -h git.example.com -d cgit cgit 0.9 I'll have that solved by the time I re-check this post but anybody else may find this very confusing when nothing appears to work. Also a link to the URL which should be accessed should be very helpfull to people. Visit http://localhost/cgi-bin/ to see cgit in action after configuring your repos, for example. Also, the post installation suggest /etc/cgit_repos where as the config file uses /etc/cgitrepos as suggestion, so would be smart to recommend that also. Reproducible: Always
Actually, it seems installing it in subdirs doesn't even work properly, unless you add some alias rules to your apache config to alias the subdirs that you install into (e.g. the -d option) Also, RewriteRule ^/(.*)$ /cgi-bin/cgit.cgi/$1 [PT] seems to be required for cgit to work at all I think.
Oliver, could you suggest some text for post-installation output, please?
As soon as I actually get it to work the way it should, I will :)
================================================================= POST-INSTALL INSTRUCTIONS ================================================================= There is a few variants of configuration: By default, cgit parses /etc/cgitrc This can be overridden globally or per vhost via SetEnv CGIT_CONFIG /etc/cgitrc in your apache/vhost config. With a default apache vhost config you can now access your repository at http://<vhostname>/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 <Directory /var/www/<vhostname>/htdocs> section. <snip> 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] <snip> 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://<vhostname>/ to get the listing, and http://<vhostname>/repository to go directly to repository. Other notes: Default css and logo in config file/uncommented are css:/css/cgit.css and logo:/img/mylogo.png However the ebuild installs /<vhostname>/cgit.css and /<vhostname>/git.png i'd suggest putting the css in /<vhostname>/css/cgit.css and /<vhostname>/mylogo.png (or rename mylogo.png to git.png and update the default config file). As said before, use cgitrepos isntead of cgit_repos to be concisted with the example config file. The entire config file is commented. Not sure on how that works with some of the defaults. Also there is a mention of a /conf somewhere locally to the domain, but it's not installed, nor is the directory created. Finally, the post install instruction mention running the cgit.cgi from the installed localtion. I'd probably recommend running it from the webapp-config installed location, especially when using local config files because a) package can be unmerged, dunno why you'd want that, but still use the vhost. b) different versions etc.
Thank you Oliver! Post-install information was just added to files/postinstall-en.txt. If there is something wrong, please, reopen bug or open new one.