Use common-debian-service-https-redirect * git.dgit.debian.org ServerName git.dgit.debian.org ServerAdmin dgit-owner@debian.org ErrorLog /var/log/apache2/git.dgit.debian.org-ssl-error.log CustomLog /var/log/apache2/git.dgit.debian.org-ssl-access.log privacy Use common-debian-service-ssl git.dgit.debian.org Use common-ssl-HSTS Use http-pkp-git.dgit.debian.org UserDir disabled DocumentRoot /srv/dgit.debian.org/unpriv/repos AllowOverride None Options SymlinksIfOwnerMatch Indexes SetEnv GIT_PROJECT_ROOT /srv/dgit.debian.org/unpriv/repos AliasMatch ^/git/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$ /srv/dgit.debian.org/unpriv/repos/$1 AliasMatch ^/git/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$ /srv/dgit.debian.org/unpriv/repos/$1 ScriptAlias /git/ /usr/lib/git-core/git-http-backend/ Options ExecCGI Indexes Require all granted RewriteEngine On RewriteRule ^/$ https://browse.dgit.debian.org/ [L,R=301] RewriteRule ^/git/?$ https://browse.dgit.debian.org/ [L,R=301] RewriteRule ^/git/ - [L] RewriteRule ^/(.*) /git/$1 [PT,L] # vim:set syntax=apache: