summaryrefslogtreecommitdiff
path: root/templates/apache-gitweb.conf.erb
blob: a490726a9866fd0d125bc3fc39eacd1b57548607 (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
NameVirtualHost  *:<%= port %>
<VirtualHost *:<%= port %>>
    ServerName <%= name %>
    DocumentRoot <%= docroot %>

<% if ssl == true -%>
    SSLEngine on
    SSLCertificateFile /etc/ssl/certs/gitweb.cert
    SSLCertificateKeyFile /etc/ssl/private/gitweb.key
<% end -%>

    <Directory <%= docroot %>>
        Options ExecCGI +FollowSymLinks +SymLinksIfOwnerMatch
        AllowOverride All
        order allow,deny
        Allow from all
        AddHandler cgi-script cgi
        DirectoryIndex gitweb.cgi
        AuthType Basic
        AuthName "Gitweb"
        AuthUserFile /home/git/.htpasswd
        Require valid-user
    </Directory>

    ErrorLog /var/log/apache2/<%= name %>_error.log
    LogLevel warn
    CustomLog /var/log/apache2/<%= name %>_access.log combined
    ServerSignature Off
</VirtualHost>