Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 May 2008 13:28:29 -0400 (EDT)
From:      "Jonathan Noack" <noackjr@alumni.rice.edu>
To:        "Douglas E. Warner" <silfreed@silfreed.net>
Cc:        freebsd-cvsweb@freebsd.org
Subject:   Re: Using cvsweb as base path in virtualhost
Message-ID:  <57219.192.168.1.10.1210872509.squirrel@www.noacks.org>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On Thu, May 15, 2008 09:50, Douglas E. Warner wrote:
> On Thursday 15 May 2008 00:08:36 Jonathan Noack wrote:
>>>   ScriptAliasMatch ^/?$ /path/to/cvsweb.cgi
>>>   ScriptAliasMatch ^(.*) /path/to/cvsweb.cgi$1
>>
>> You don't need the first ScriptAliasMatch line.  The second is
>> effectively a superset of the first.  I use that exact syntax and it
>> works correctly for me.  Try commenting out the first line and see what
>> happens.
>
> Thanks for the response.  Unfortunately in my current setup the main page
> didn't work without the first line.
>
> I was able to simplify the apache configuration by trying this:
>
> ScriptAlias / /path/to/cvsweb.cgi/
>
> But unfortunately I still get the strange redirection.
>
> I forgot to mention previously that I'm using cvsweb 3.0.6.

Doug,
I found the issue with using CVSweb as the base path.  There is some old
code in to work around "thttpd stupidity".  This is tripping the redirect
code and causing the strange behavior.  Please try the attached patch to
cvsweb.cgi.  It should work with your current ScriptAlias line; if not,
try this one:
ScriptAliasMatch ^(.*) /path/to/cvsweb.cgi$1

I'll need to test with recent thttpd versions before rolling this into a
new release.

Regards,
-Jonathan
[-- Attachment #2 --]
--- cvsweb.cgi.orig	2008-05-15 13:14:39.000000000 -0400
+++ cvsweb.cgi	2008-05-15 13:18:14.000000000 -0400
@@ -302,11 +302,11 @@
 $scriptname    =~ s|^/*|/|;
 
 # Let's workaround thttpd's stupidity..
-if ($scriptname =~ m|/$|) {
-  $pathinfo .= '/';
-  my $re = quotemeta $pathinfo;
-  $scriptname =~ s/$re$//;
-}
+#if ($scriptname =~ m|/$|) {
+#  $pathinfo .= '/';
+#  my $re = quotemeta $pathinfo;
+#  $scriptname =~ s/$re$//;
+#}
 
 # $scriptname : the URI escaped path to this script
 # $where      : the path in the CVS repository (without leading /, or only /)

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?57219.192.168.1.10.1210872509.squirrel>