我已经在gerrit.mydomain.com的子域名上建立了gerrit。默认情况下,gerrit在端口8080上运行,因此我已经将gerrit.config httpd部分中的端口更改为80,所以现在gerrit.mydomain.com打开了gerrit主页。
现在,当我通过运行以下命令打印规范url时:
git config -f ~/gerrit_folder/etc/gerrit.config gerrit.canonicalWebUrl它仍然以如下方式显示url:
http://localhost:8080/现在的问题是,当我通过openID登录时,它会以gerrit.mydomain.com:8080的身份返回到我的域,但是没有发生任何事情,因为那里没有服务器。
请您告诉我如何解决这个问题,以便将其重定向到gerrit.mydomain.com,并将规范url更改为http://localhost:80。
发布于 2015-03-18 20:07:47
gerrit.canonicalWebUrl与httpd.port配置无关。如果您使用代理服务器(如nginx或apache)将端口80或443 (webserver)转发到端口8080 (gerrit),则这是有意义的。
您必须编辑gerrit.config并将canonicalWebUrl行调整为主机名。您应该能够运行git config -f ~/gerrit_folder/etc/gerrit.config --add gerrit.canonicalWebUrl "http://gerrit.mydomain.com/"
我还强烈建议在ssl中使用反向代理。
https://stackoverflow.com/questions/29017714
复制相似问题