From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Narebski Subject: Re: gitweb: false base href sent when integrated via reverse proxy and path_info is active Date: Sun, 28 Nov 2010 22:07:01 +0100 Message-ID: <201011282207.03261.jnareb@gmail.com> References: <20101128081048.13668.67286.reportbug@sb74.startrek> <201011281847.40233.jnareb@gmail.com> <4CF2BBEE.2050808@nachtgeist.net> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: Giuseppe Bilotta , Jonathan Nieder , git@vger.kernel.org To: Daniel Reichelt X-From: git-owner@vger.kernel.org Sun Nov 28 22:07:21 2010 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PMoSu-0002CI-Qo for gcvg-git-2@lo.gmane.org; Sun, 28 Nov 2010 22:07:21 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752815Ab0K1VHP (ORCPT ); Sun, 28 Nov 2010 16:07:15 -0500 Received: from mail-fx0-f46.google.com ([209.85.161.46]:55038 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751961Ab0K1VHO (ORCPT ); Sun, 28 Nov 2010 16:07:14 -0500 Received: by fxm15 with SMTP id 15so1912201fxm.19 for ; Sun, 28 Nov 2010 13:07:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:cc:references:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:message-id; bh=2OTCJIzTB3IVPswtL9hspLD9GQpuzkuwzOJzgl2Qrn8=; b=oSNvfuUGhfu0stsa3K1uE+p2QVxHqjZEvHFQGXWORG6ITfdPufyvRA2js4RSWN0Tef cELrVd4HdtKzz1erRqDxhIzG40uPJTQB76snpnLFdGEMr5OIk8zZNZY5kmWftavARYiQ TSqUJnN3flfYjQF15kvEJrjfpu00j9C4BDnh4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:message-id; b=SFhbxaf/O/CSZzi9zEQQfrUE7g0BrM0l/0oJO/3SVWlNxH67Gz7dFCDaeV4TNRP8Tb bBtABUE/rbFJeXVtf6UfONRBuZT1GOwJIuA+hbkONlHwAW+p8iR66tXHz2T8rk/omRNS nRyFC6zha/CpG4HwWxEVamYfKVs2ayVhRmblk= Received: by 10.223.96.137 with SMTP id h9mr4483564fan.54.1290978433212; Sun, 28 Nov 2010 13:07:13 -0800 (PST) Received: from [192.168.1.13] (abwq157.neoplus.adsl.tpnet.pl [83.8.240.157]) by mx.google.com with ESMTPS id a25sm984917fak.20.2010.11.28.13.07.08 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 28 Nov 2010 13:07:12 -0800 (PST) User-Agent: KMail/1.9.3 In-Reply-To: <4CF2BBEE.2050808@nachtgeist.net> Content-Disposition: inline Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Sun, 28 Nov 2010, Daniel Reichelt wrote: >>> Lacking that, a plain >>> >>> our $base_url = 'whatever'; >>> >>> in the gitweb config should probably work > > Nope again, I'm afraid it doesn't (see further down) Strange, it works for me (see below). >> See also gitweb/README, the "Gitweb config file variables" section: >> >> * $base_url >> Base URL for relative URLs in pages generated by gitweb, >> (e.g. $logo, $favicon, @stylesheets if they are relative URLs), >> needed and used only for URLs with nonempty PATH_INFO via >> . Usually gitweb sets its value correctly, >> ^^^^^^^ >> and there is no need to set this variable, e.g. to $my_uri or "/". >> >> The key word here is "usually" ;-) >> > > *oops* thank you all for the hint! I totally missed that. > > However, I just tried that and it failed. $base_url gets ignored in > gitweb.conf and even setting $my_url and $my_uri in gitweb.conf seems to > have no effect at all. For testing purposes I printed the relevant > variables to the html header: > > > gitweb.conf: > ************ The default name of gitweb config file is gitweb_config.perl, not gitweb.conf. Are you sure you are picking correct config file? > our $feature{'pathinfo'}{'default'} = [1]; > our $base_url = "https://foobar"; > our $my_url = "https://foo"; > our $my_uri = "https://bar"; Try adding our $site_name = "foo"; to check if you are picking correct config file. > - git summary of repo "test1" > public url: https://sb74/projects/gitweb/test1/summary > revProxy url: https://localhost:446/projects/gitweb/test1/summary > ************ > > > > > localhost Git - test1/summary > [...] > I get the following when running with config file that contains: our $version = "current"; [...] our $site_name = "[localhost]"; [...] our $base_url = "https://localhost/gitweb/"; $ gitweb-run.sh "" "/git.git" [...] [localhost] - git.git/summary [...] So it works for me. -- Jakub Narebski Poland