summaryrefslogtreecommitdiff
path: root/templates/apache-gitweb.conf.erb
diff options
context:
space:
mode:
Diffstat (limited to 'templates/apache-gitweb.conf.erb')
-rw-r--r--templates/apache-gitweb.conf.erb16
1 files changed, 16 insertions, 0 deletions
diff --git a/templates/apache-gitweb.conf.erb b/templates/apache-gitweb.conf.erb
index d0736ae..dca3f5f 100644
--- a/templates/apache-gitweb.conf.erb
+++ b/templates/apache-gitweb.conf.erb
@@ -1,6 +1,11 @@
+NameVirtualHost *:<%= port %>
<VirtualHost *:<%= port %>>
ServerName <%= name %>
DocumentRoot <%= docroot %>
+
+ RewriteEngine On
+ RewriteRule ^/$ /gitweb [R]
+
<Directory <%= docroot %>>
Options ExecCGI +FollowSymLinks +SymLinksIfOwnerMatch
AllowOverride All
@@ -8,6 +13,17 @@
Allow from all
AddHandler cgi-script cgi
DirectoryIndex gitweb.cgi
+ <%# if auth == true -%>
+ AuthType Basic
+ AuthName "Protected"
+ AuthUserFile /usr/local/apache/passwd/passwords
+ Require valid-user
+ <%# end -%>
</Directory>
+
+ ErrorLog /var/log/apache2/<%= name %>_error.log
+ LogLevel warn
+ CustomLog /var/log/apache2/<%= name %>_access.log combined
+ ServerSignature Off
</VirtualHost>