Closed GoogleCodeExporter closed 9 years ago
You probably need to change the httpd.listenUrl parameter
to be proxy-http:// rather than http://. This will modify
how the server reads the HTTP request to pay attention to
the proxy headers inserted by Apache, allowing it to use
the URL Apache is serving.
You can also set the gerrit.canonicalWebUrl parameter
to be the URL you want Gerrit accessed as. Setting this
will help to ensure that Gerrit always knows its address,
even if its not currently handling a web request.
Both variables are in site_path/etc/gerrit.config.
Original comment by sop@google.com
on 19 Jul 2010 at 1:59
Hi,
Hi,
Thanks,
That almost worked. I think you are right in that it is related to one of
those parameters.
http.listenrUrl now point to proxt-http and this now resolves correctly..
However there is another problem. My APACHE server ProxyPass rules are
something like:
ProxyPass /gerrit/ http://internal-ip:8080/
ProxyPassReverse /gerrit/ http://internal-ip:8080/
However the link that is created is omitting the gerrit/
e.g:
https://externalservername.com/#VE,q4FLRKTBuympzCOiQuoq04J/t1v3srz26DDxvQ==$ZW1t
YW51ZWwuaWhlbmFjaG9AYWNjZW50dXJlLmNvbQ==
Could those rules cause this problem?
Regards,
EI
Original comment by eihena...@googlemail.com
on 19 Jul 2010 at 8:26
Yes. If your Apache server has /gerrit/ as the URL
then you actually need to do:
ProxyPass /gerrit/ http://internal-ip:8080/gerrit/
and setup the same thing in listenUrl:
[http]
listenUrl = proxy-http://internal-ip:8080/gerrit/
Original comment by sop@google.com
on 19 Jul 2010 at 9:00
|The question is how do I get gerrit to server from here?
http://internal-ip:8080/gerrit/ Jetty config or Apache? Can I do that with
just starting the gerrit.sh at command line?
Original comment by eihena...@googlemail.com
on 19 Jul 2010 at 10:24
The path portion of the URL in the apache
configuration must match the path portion
of the URL in gerrit.config's own http
listenUrl variable.
So if Apache has /gerrit/, you need to also
put that into the URL in gerrit.config.
Original comment by sop@google.com
on 19 Jul 2010 at 10:48
I overlooked that. Thanks mate.. SOLVED
Original comment by eihena...@googlemail.com
on 20 Jul 2010 at 12:09
Original issue reported on code.google.com by
eihena...@googlemail.com
on 19 Jul 2010 at 8:30