ProxyPass /r/ https://*:8081/r/
The ProxyPass and httpd.listenUrl have to agree. If you want Gerrit to
be at https://host/r/ then you need to write:
gerrit.config:
[gerrit]
canonicalWebUrl = https://review.example.com/r/
[httpd]
listenUrl = proxy-https://*:8081/r/
apache:
ProxyPass /r/ https://*:8081/r/
Conversely, if you don't want the /r/ there and want Gerrit on just /
(so it "owns" the hostname) then drop the /r/ everywhere:
gerrit.config:
[gerrit]
canonicalWebUrl = https://review.example.com/
[httpd]
listenUrl = proxy-https://*:8081/
apache:
ProxyPass / https://*:8081/
After following your 2nd suggestion that is replace ip address like
127.0.0.1 with * as well as configure path like "/" instead of "/r/",
firefox was complaining that the proxy sever could not handle the
request "https://review.example.com" and telling me that the reason is
DNS lookup failure for: *. And then, check out the error log for
gerrit site, saying the same as firefox:
[error] [client 127.0.0.1] proxy: DNS lookup failure for: * returned
by /favicon.ico.
Therefore, I have to turn to the origin workaround as described in my
last post. Then, it looks like i can fix the issue as mentioned above.
Unfortunately, however, the evil ever appearing in my last post still
shows itself up to me, which is "proxy: pass request body failed to
127.0.0.1:8081 (127.0.0.1) from 127.0.0.1 () ".
So, any ideas on that?
(As a side note, i really can navigate to http://review.example.com:8081
or http://127.0.0.1:8081 instead of http://review.example.com or
http://127.0.0.1. In addition, URL always fails as long as prefixing
https://, whether it is postfixed with the port 8081 or not. So, this
has already indicated that GerritCodeReview daemon (called gerrit.sh
located at /home/gerrit/bin/) has no support for https, right? In
other words, this daemon can speak http only, not including https?
But, actually this setting for https has been configured in /home/
gerrit/etc/gerrit.config. Strange enough! So, what about you?)
On Feb 27, 4:35 am, Shawn Pearce <s...@google.com> wrote:
> On Fri, Feb 24, 2012 at 09:38, Samuel Omlin <samuel.om...@gmail.com> wrote:
> > cat /home/gerrit/etc/gerrit.config
> > [gerrit]
> > basePath = /home/git/repositories
> > canonicalWebUrl =https://review.example.com
> > [httpd]
> > listenUrl = proxy-https://*:8081/
> ..
> > 4> Configure Apache Server with Reverse Proxy and SSL
> > ProxyPass /r/ https://*:8081/r/
>
> The ProxyPass and httpd.listenUrl have to agree. If you want Gerrit to
> be athttps://host/r/then you need to write:
>
> gerrit.config:
> [gerrit]
> canonicalWebUrl =https://review.example.com/r/
> [httpd]
> listenUrl = proxy-https://*:8081/r/
>
> apache:
> ProxyPass /r/ https://*:8081/r/
>
> Conversely, if you don't want the /r/ there and want Gerrit on just /
> (so it "owns" the hostname) then drop the /r/ everywhere:
>
> gerrit.config:
> [gerrit]
> canonicalWebUrl =https://review.example.com/
I'm not an apache expert, but I suspect you need to add the host to
which you want to forward the requests to the ProxyPass statement,
e.g.
if you have proxy-https://*:8081/ and canonicalWebUrl
=https://review.example.com/ in gerrit.config, use
ProxyPass / https://your.gerrit.host.or.ip:8081/
if you have proxy-https://*:8081/r/ and canonicalWebUrl
=https://review.example.com/r/ in gerrit.config, use
ProxyPass /r/ https://your.gerrit.host.or.ip:8081/r/
Regards,
--Christopher
> --
> To unsubscribe, email repo-discuss...@googlegroups.com
> More info at http://groups.google.com/group/repo-discuss?hl=en