{"thread":{"id":"13846","subject":"[PATCH] Fix missing \"HEAD\" in the RewriteRule","startedAt":"2008-06-07T07:19:26Z","lastAt":"2008-06-08T01:17:51Z","messageCount":4,"participants":["Ask Bjørn Hansen","Jakub Narebski","Mike Hommey","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"79024","messageId":"1212823166-25098-1-git-send-email-ask@develooper.com","threadId":"13846","inReplyTo":null,"subject":"[PATCH] Fix missing \"HEAD\" in the RewriteRule","fromName":"Ask Bjørn Hansen","fromEmail":"ask@develooper.com","sentAt":"2008-06-07T07:19:26Z","receivedAt":"2008-06-07T07:19:26Z","isPatch":true,"sender":{"key":"ask@develooper.com","avatar":"https://gravatar.com/avatar/05ce68433216df7d04bb0d82b7d93b11957e2137e6ed23c4b5bc061d78635f2f?d=mp&s=160"},"body":"Also add a few more hints for how to setup and configure gitweb as described\n---\n gitweb/README |   18 ++++++++++++++----\n 1 files changed, 14 insertions(+), 4 deletions(-)\n\nThe important change is to add HEAD into the regexp, everything else is\noptional...\n\ndiff --git a/gitweb/README b/gitweb/README\nindex 8f7ea36..b96834b 100644\n--- a/gitweb/README\n+++ b/gitweb/README\n@@ -255,12 +255,15 @@ Webserver configuration\n If you want to have one URL for both gitweb and your http://\n repositories, you can configure apache like this:\n \n-<VirtualHost www:80>\n-    ServerName git.domain.org\n+<VirtualHost *:80>\n+    ServerName git.example.org\n     DocumentRoot /pub/git\n-    RewriteEngine on\n-    RewriteRule ^/(.*\\.git/(?!/?(info|objects|refs)).*)?$ /cgi-bin/gitweb.cgi%{REQUEST_URI}  [L,PT]\n     SetEnv\tGITWEB_CONFIG\t/etc/gitweb.conf\n+    RewriteEngine on\n+    # make the front page an internal rewrite to the gitweb script \n+    RewriteEngine ^/$  /cgi-bin/gitweb.cgi\n+    # make access for \"dumb clients\" work\n+    RewriteRule ^/(.*\\.git/(?!/?(HEAD|info|objects|refs)).*)?$ /cgi-bin/gitweb.cgi%{REQUEST_URI}  [L,PT]\n </VirtualHost>\n \n The above configuration expects your public repositories to live under\n@@ -276,6 +279,13 @@ override the defaults given at the head of the gitweb.perl (or\n gitweb.cgi).  Look at the comments in that file for information on\n which variables and what they mean.\n \n+If you use the rewrite rules from the example you'll likely also need\n+something like the following in your gitweb.conf (or gitweb_config.perl) file:\n+\n+  @stylesheets = (\"/some/absolute/path/gitweb.css\");\n+  $my_uri = \"/\";\n+  $home_link = \"/\";\n+\n \n Originally written by:\n   Kay Sievers <kay.sievers@vrfy.org>\n-- \n1.5.3.5.561.g140d\n"},{"id":"79032","messageId":"m3bq2dy58j.fsf@localhost.localdomain","threadId":"13846","inReplyTo":"1212823166-25098-1-git-send-email-ask@develooper.com","subject":"Re: [PATCH] Fix missing \"HEAD\" in the RewriteRule","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-06-07T09:16:51Z","receivedAt":"2008-06-07T09:16:51Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Ask Bjørn Hansen <ask@develooper.com> writes:\n\n> Also add a few more hints for how to setup and configure gitweb as described\n> ---\n>  gitweb/README |   18 ++++++++++++++----\n>  1 files changed, 14 insertions(+), 4 deletions(-)\n> \n> The important change is to add HEAD into the regexp, everything else is\n> optional...\n[...]\n> @@ -255,12 +255,15 @@ Webserver configuration\n>  If you want to have one URL for both gitweb and your http://\n>  repositories, you can configure apache like this:\n\nThanks a lot.\n\nThe only (minor) complaint is that from the commit message itself it\nis not obvous that you meant web server (Apache) configuration trick\nto have one URL for both gitweb and access via HTTP protocol for git\nrepositories (fetch, clone,...).\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"79037","messageId":"20080607100627.GA990@glandium.org","threadId":"13846","inReplyTo":"1212823166-25098-1-git-send-email-ask@develooper.com","subject":"Re: [PATCH] Fix missing \"HEAD\" in the RewriteRule","fromName":"Mike Hommey","fromEmail":"mh@glandium.org","sentAt":"2008-06-07T10:06:27Z","receivedAt":"2008-06-07T10:06:27Z","isPatch":true,"sender":{"key":"mh@glandium.org","avatar":"https://avatars.githubusercontent.com/u/1038527?v=4"},"body":"On Sat, Jun 07, 2008 at 12:19:26AM -0700, Ask Bjørn Hansen wrote:\n> Also add a few more hints for how to setup and configure gitweb as described\n> ---\n>  gitweb/README |   18 ++++++++++++++----\n>  1 files changed, 14 insertions(+), 4 deletions(-)\n> \n> The important change is to add HEAD into the regexp, everything else is\n> optional...\n> \n> diff --git a/gitweb/README b/gitweb/README\n> index 8f7ea36..b96834b 100644\n> --- a/gitweb/README\n> +++ b/gitweb/README\n> @@ -255,12 +255,15 @@ Webserver configuration\n>  If you want to have one URL for both gitweb and your http://\n>  repositories, you can configure apache like this:\n>  \n> -<VirtualHost www:80>\n> -    ServerName git.domain.org\n> +<VirtualHost *:80>\n> +    ServerName git.example.org\n>      DocumentRoot /pub/git\n> -    RewriteEngine on\n> -    RewriteRule ^/(.*\\.git/(?!/?(info|objects|refs)).*)?$ /cgi-bin/gitweb.cgi%{REQUEST_URI}  [L,PT]\n>      SetEnv\tGITWEB_CONFIG\t/etc/gitweb.conf\n> +    RewriteEngine on\n> +    # make the front page an internal rewrite to the gitweb script \n> +    RewriteEngine ^/$  /cgi-bin/gitweb.cgi\n\nYou meant RewriteRule, right ?\n\nMike\n"},{"id":"79082","messageId":"7vbq2cn2rk.fsf@gitster.siamese.dyndns.org","threadId":"13846","inReplyTo":"1212823166-25098-1-git-send-email-ask@develooper.com","subject":"Re: [PATCH] Fix missing \"HEAD\" in the RewriteRule","fromName":"Junio C Hamano","fromEmail":"junio@pobox.com","sentAt":"2008-06-08T01:17:51Z","receivedAt":"2008-06-08T01:17:51Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ask Bjørn Hansen <ask@develooper.com> writes:\n\n> Also add a few more hints for how to setup and configure gitweb as described\n\nI'll squash in Mike Hommey's typofix to make the patch to read like this:\n\n> ...\n> +    RewriteEngine on\n> +    # make the front page an internal rewrite to the gitweb script \n> +    RewriteRule ^/$  /cgi-bin/gitweb.cgi\n> ...\n\nI'll also retitle it to \"gitweb setup instruction: rewrite HEAD and root\nas well\".\n\nPlease sign-off your future patches.\n\nThanks.\n"}]}