git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 3/5] http-backend: use mod_alias instead of mod_rewrite

From
Mark Lodato <lodatom@gmail.com>
Date
Oct 25, 2009, 18:05 UTC
Message-ID
<1256493935-8680-4-git-send-email-lodatom@gmail.com>
In-Reply-To
<1256493935-8680-3-git-send-email-lodatom@gmail.com>

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>
---
 Documentation/git-http-backend.txt |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/Documentation/git-http-backend.txt b/Documentation/git-http-backend.txt
index 0b5e951..e67519d 100644
--- a/Documentation/git-http-backend.txt
+++ b/Documentation/git-http-backend.txt
@@ -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/
 ----------------------------------------------------------------
 
 
-- 
1.6.5.1
Previous: Mark LodatoNext: Mark Lodato
Message 4 of 8 in “Updates for git-http-backend”
  1. 0/5 Updates for git-http-backendMark Lodato, Oct 25, 2009
  2. 1/5 http-backend: add GIT_PROJECT_ROOT environment varMark Lodato, Oct 25, 2009
  3. 2/5 http-backend: reword some documentationMark Lodato, Oct 25, 2009
  4. 3/5 http-backend: use mod_alias instead of mod_rewriteMark Lodato, Oct 25, 2009
  5. 4/5 http-backend: add example for gitweb on same URLMark Lodato, Oct 25, 2009
  6. 5/5 http-backend: more explict LocationMatchMark Lodato, Oct 25, 2009
  7. Shawn O. PearceOct 27, 2009
  8. Junio C HamanoOct 28, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.