gitweb on Ubuntu Server as Location/Directory instead of Virtual Host

Posted by mbx on Server Fault See other posts from Server Fault or by mbx
Published on 2011-03-11T23:54:34Z Indexed on 2011/03/12 0:12 UTC
Read the original article Hit count: 581

Filed under:
|

Since DynDNS no longer resolves subdomains for free I have use gitweb on a subdir of the apache2. Usual suspects such as Pro Git suggest something like

<VirtualHost *:80>
    ServerName gitserver
    DocumentRoot /srv/gitosis/repositories/
    <Directory /srv/gitosis/repositories/>
        Options ExecCGI +FollowSymLinks +SymLinksIfOwnerMatch
        AllowOverride All
        order allow,deny
        Allow from all
        AddHandler cgi-script cgi
        DirectoryIndex gitweb.cgi
    </Directory>
</VirtualHost>

I tried various variations using Location and Directory tags with different attribute combinations without any notable success.

My first Idea was close to the following

Alias /gitweb /srv/gitosis/repositories
<Location /gitweb>
    AuthType Basic
    AuthName "gitweb Repository view"
    AuthUserFile /etc/apache2/gitweb.passwd
    Require valid-user
    SSLRequireSSL
    SetEnv GITWEB_CONFIG /etc/gitweb.conf
    AddHandler cgi-script cgi
    DirectoryIndex /usr/lib/cgi-bin/gitweb.cgi
</Location>

Apache is in the gitosis group, the repositories are readable and executable for that group.

So, what is the indended way to get websvn run on Ubuntu 10?

© Server Fault or respective owner

Related posts about ubuntu

Related posts about gitweb