Issue 2391: Top Menu links for gitblit don't work when gerrit deployed as /gerrit/
Status:  Released
Owner: ----
Closed:  Jan 2014
Reported by brett.de...@gmail.com, Jan 10, 2014
************************************************************
***** NOTE: THIS BUG TRACKER IS FOR GERRIT CODE REVIEW *****
***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, INTERNAL *****
***** ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC.    *****
***** THOSE ISSUE BELONG IN DIFFERENT ISSUE TRACKERS!  *****
************************************************************

Affected Version:

What steps will reproduce the problem?
1. Deploy Gerrit 2.8-stable on context path /gerrit/
2. Deploy gerrit-gitblit-plugin
3. Select GitBlit -> Repositories

What is the expected output?

Opens /gerrit/plugins/gitblit/repositories/ and displays GitBlit

What do you see instead?

404 not found
The requested URL /plugins/gitblit/repositories/ was not found on this server.

Please provide any additional information below.

Probably an issue with all plugins based on cookbook-plugin that uses the TopMenu feature. The cookbook-plugin seems to assume that the context path of the application is always '/' and sets the base URL to be /plugins/<name> rather than asking the webapp what its context path is.


Jan 10, 2014
Project Member #1 David.Os...@gmail.com
Are you using tomcat-7 or another application server?
Status: AwaitingInformation
Jan 10, 2014
#2 brett.de...@gmail.com
No, plain Gerrit but deployed to /gerrit/ path in front of apache httpd 2.2 as follows:
<VirtualHost *:443>
... ssl stuff ...

ProxyPreserveHost on
<Proxy http://localhost:8080/gerrit/*
  AllowOverride None
  Order allow,deny
  Allow from all
</Proxy>
AllowEncodedSlashes On
ProxyPass /gerrit/ http://localhost:8080/gerrit/ nocanon

...

As per the documentation.

Relevant bits of gerrit.config:

[gerrit]
canonicalWebUrl = https://example.com/gerrit/

[httpd]
listenUrl = proxy-https://localhost:8080/gerrit

[gitweb]
type = custom
url = plugins/
linkname = gitblit
project = gitblit/summary/?r=${project}
...

Jan 17, 2014
#3 brett.de...@gmail.com
This only appears to affect the top menu, links generated from Projects-> (a project) -> branches appear to work just fine
Jan 18, 2014
Project Member #4 David.Os...@gmail.com
https://gerrit-review.googlesource.com/53912
Status: ChangeUnderReview
Jan 26, 2014
#5 brett.de...@gmail.com
Hi,

I cherry-picked the change onto the 2.8-stable branch and it works perfectly.
Thank you very much, this defect can be closed.

Brett
Jan 26, 2014
Project Member #6 edwin.ke...@gmail.com
(No comment was entered for this change.)
Status: Submitted
Labels: FixedIn-2.9
Jul 18, 2014
Project Member #7 edwin.ke...@gmail.com
(No comment was entered for this change.)
Status: Released