Gerrit 更改规范 URL
Gerrit Change Canonical URL
我已经在 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 returns 以 gerrit.mydomain.com:8080 登录到我的域时,没有任何反应,因为那里没有服务器
你能告诉我如何解决这个问题,以便它重定向到 gerrit.mydomain.com 并且规范 url 将更改为 http://localhost:80
吗?
gerrit.canonicalWebUrl
与httpd.port
配置无关。如果您使用代理服务器(例如 nginx 或 apache),将端口 80 或 443(网络服务器)转发到端口 8080(gerrit),这是有意义的
您必须编辑 gerrit.config 并将 canonicalWebUrl 行调整为应有的主机名。
你应该可以 运行 git config -f ~/gerrit_folder/etc/gerrit.config --add gerrit.canonicalWebUrl "http://gerrit.mydomain.com/"
我还强烈建议使用带 ssl 的反向代理。
我已经在 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 returns 以 gerrit.mydomain.com:8080 登录到我的域时,没有任何反应,因为那里没有服务器
你能告诉我如何解决这个问题,以便它重定向到 gerrit.mydomain.com 并且规范 url 将更改为 http://localhost:80
吗?
gerrit.canonicalWebUrl
与httpd.port
配置无关。如果您使用代理服务器(例如 nginx 或 apache),将端口 80 或 443(网络服务器)转发到端口 8080(gerrit),这是有意义的
您必须编辑 gerrit.config 并将 canonicalWebUrl 行调整为应有的主机名。
你应该可以 运行 git config -f ~/gerrit_folder/etc/gerrit.config --add gerrit.canonicalWebUrl "http://gerrit.mydomain.com/"
我还强烈建议使用带 ssl 的反向代理。