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

gitweb, How to script alias to a directory? for cloning over http

From
TLTyrone Lucero <tyrone.lucero@gmail.com>
Date
Aug 7, 2013, 23:11 UTC
Message-ID
<CAOxYNk+R97KQc0G-=_KPT==gmpKn=Yv9Awpzfq29kx=A7Zv+Rw@mail.gmail.com>
Hello, I need some guide that can  explain me the following:

I wish to know the correct rule to make work cloning over http with my configuration, without taking all the web server to server only as github

I setup gitweb to it can show in a directory by example, localhost/gitweb or 192.168.1.20/gitweb ; and works fine, including rewrite rule

Config file under conf.d from apache config files:
Alias /gitweb /usr/share/gitweb

SetEnv GITWEB_CONFIG /etc/gitweb.conf SetEnv GIT_PROJECT_ROOT /var/git SetEnv GIT_HTTP_EXPORT_ALL

<Directory /usr/share/gitweb>
  Options ExecCGI FollowSymLinks Indexes
  AddHandler cgi-script .cgi
  Allow from all
  Order allow,deny
  DirectoryIndex index.cgi
  # Pretty gitweb URLs need rewrite engine on an enabled
  RewriteEngine on
  # rule condition indicates get filenames
  RewriteCond %{REQUEST_FILENAME} !-f
  # rule condition indicates get listing directories
  RewriteCond %{REQUEST_FILENAME} !-d
  # rule condition to show pretty short urls
  RewriteRule ^.* /gitweb/gitweb.cgi/$0 [L,PT]
</Directory>

-- Fénix

Message 1 of 1 in “gitweb, How to script alias to a directory? for cloning over http”
  1. Tyrone LuceroAug 7, 2013

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.