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

    RewriteEngine On
    RewriteRule ^/$ /gitweb [R]

<% 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 "Protected"
        AuthUserFile /usr/local/apache/passwd/passwords
        Require valid-user
    </Directory>

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