i have installed gerrit 2.12.3 on ubuntu server 16.04 system.
- gerrit listening on
http://127.0.0.1:8102
. - behind nginx server, listening on
https://server1:8102
.
some contents of etc/gerrit.config
file follow:
[gerrit] basepatr = git canonicalweburl = https://server1:8102/ [httpd] listenurl = proxy-https://127.0.0.1:8102/
and contents of nginx settings follow:
server { listen 10.10.20.202:8102 ssl; ssl on; ssl_certificate /etc/nginx/ssl/server1.crt; ssl_certificate_key /etc/nginx/ssl/server1.key; location / { # allow large file uploads client_max_body_size 0; proxy_set_header host $host; proxy_set_header x-real-ip $remote_addr; proxy_pass http://127.0.0.1:8102; } }
nearly function of gerrit works now. 1 problem can not solved that:
the url generated in notification email https://server1:8102/11
seems right, when click link, redirects https://server1/#/c/11/
instead of https://server1:8102/#/c/11/
can tell me how solve it?
thanks.
that port of gerrit.canonicalweburl
, httpd.listenurl
match makes no sense.
- specify
gerrit.canonicalweburl
url accessible users through nginx proxy, e.g.,https://gerrit.example.com
. - this vhost in nginx (listening port 443) in turn configured in proxy connect backend specified in
httpd.listenurl
, e.g. port 8102 gerrit listening in case.
the canonicalweburl
used gerrit knows own host name, e.g., sending email notifications iirc.
you might follow gerrit documentation , stick ports described there.
edit: noticed want proxy and gerrit both listen on port 8102 - on public interface respectively on 127.0.0.1. while work, if make sure nginx not binding 0.0.0.0, think makes totally no sense. don't want users connect via https on port 443?
Comments
Post a Comment