{"thread":{"id":"4119","subject":"common URL for repository and gitweb","startedAt":"2006-05-10T23:00:46Z","lastAt":"2006-05-10T23:00:46Z","messageCount":1,"participants":["Martin Waitz"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"19842","messageId":"20060510230046.GC3228@admingilde.org","threadId":"4119","inReplyTo":null,"subject":"common URL for repository and gitweb","fromName":"Martin Waitz","fromEmail":"tali@admingilde.org","sentAt":"2006-05-10T23:00:46Z","receivedAt":"2006-05-10T23:00:46Z","isPatch":false,"sender":{"key":"tali@admingilde.org","avatar":"https://gravatar.com/avatar/3f89b03eee362187effabe257898735b475673a12265c398ea9161259ae91553?d=mp&s=160"},"body":"hoi :)\n\nI hacked a little bit in gitweb so that it can get the project path\nform the URI without using a ?p= parameter.  That is, you can now\nuse \"http://.../cgi-bin/gitweb.cgi/path/to/project/\" to show\nthe summary of your project.\n\nTogether with a apache configuration like below, you can give your\ngitweb pages the same URL as your repositories:\n\n\t<VirtualHost www:80>\n\t\tServerName git.hostname.org\n\t\tDocumentRoot /pub/git\n\t\tRewriteEngine on\n\t\tRewriteRule ^/(.*\\.git/(.*\\.html)?)?$ /usr/lib/cgi-bin/gitweb.cgi%{REQUEST_URI}  [L]\n\t</VirtualHost>\n\nThis will rewrite all URLs that go to gitweb to use the CGI, while\nleaving URLs for the repository intact.\n\nYou can see an example at http://git.admingilde.org/.\nThe gitweb version used for that is available here, too.\n\nAs an added bonus, gitweb can now serve the \"html\" branch of a\nrepository directly using \"text/html\", so you can show your\ndocumentation without needing to update a checked out version\nof this branch.\nFor example have a look at the GIT manpages at\nhttp://git.admingilde.org/tali/git.git/git.html\n\n-- \nMartin Waitz\n"}]}