Skip to content

Commit

Permalink
http-backend: use mod_alias instead of mod_rewrite
Browse files Browse the repository at this point in the history
In the git-http-backend documentation, use mod_alias exlusively, instead
of using a combination of mod_alias and mod_rewrite.  This makes the
example slightly shorted and a bit more clear.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Mark Lodato authored and Junio C Hamano committed Nov 5, 2009
1 parent b9af4ab commit 0ebb1fa
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions Documentation/git-http-backend.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,9 @@ Accelerated static Apache 2.x::
----------------------------------------------------------------
SetEnv GIT_PROJECT_ROOT /var/www/git

ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/
Alias /git_static/ /var/www/git/

RewriteEngine on
RewriteRule ^/git/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$ /git_static/$1 [PT]
RewriteRule ^/git/(.*/objects/pack/pack-[0-9a-f]{40}.pack)$ /git_static/$1 [PT]
RewriteRule ^/git/(.*/objects/pack/pack-[0-9a-f]{40}.idx)$ /git_static/$1 [PT]
AliasMatch ^/git/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$ /var/www/git/$1
AliasMatch ^/git/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$ /var/www/git/$1
ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/
----------------------------------------------------------------


Expand Down

0 comments on commit 0ebb1fa

Please sign in to comment.