AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 889989
Accepted
andi
andi
Asked: 2017-12-30 03:54:03 +0800 CST2017-12-30 03:54:03 +0800 CST 2017-12-30 03:54:03 +0800 CST

当我设置 gerrit.canonicalWebUrl 时,“页面没有正确重定向”

  • 772

从https://github.com/GerritCodeReview/docker-gerrit安装 Gerrit 以下Using Gerrit in production部分后,该字段自动设置为此值:

[gerrit]
        canonicalWebUrl = http://eac32ee72f2b/

我想在反向代理后面使用 Gerrit,所以我这样配置 Apache2:

ProxyPass / http://192.168.19.241:8080/ nocanon

这有效,但是一旦我设置gerrit.canonicalWebUrl为https://gerrit.example.com,我得到页面没有正确重定向并且浏览器中的 URL 变为https://gerrit.example.com//login/.

如果我尝试将规范的 web url 设置为https://gerrit.example.com/g/并将 Apache2 相应地更新为:

ProxyPass /g/ http://192.168.19.241:8080/g/ nocanon

我在浏览器中收到“未找到”消息,并且栏中的 URL 现在显示为https://gerrit.example.com/g//g//g//g//g//g//g//g//g//g//g//g//g//g//g//g//g//g//g//g//g. 如果我检查 HTTP 标头,对于页面的初始请求,https://gerrit.example.com/g我会得到 301 重定向到https://gerrit.example.com/g//g.

在所有情况下,配置httpd.listenUrl都是proxy-http://*:8080.

谁能告诉我我做错了什么?我想设置正确的 Web URL,因为它在通过 HTTP 检出存储库的链接中可见,也可能在其他地方可见。

gerrit
  • 1 1 个回答
  • 1080 Views

1 个回答

  • Voted
  1. Best Answer
    andi
    2018-01-04T03:30:33+08:002018-01-04T03:30:33+08:00

    我错过了这一章:https ://gerrit-review.googlesource.com/Documentation/config-reverseproxy.html#_ssl

    它被编写用来proxy-https代替proxy-http在 Apache2 中使用 HTTPS 时使用。这一切都适用于这个配置:

    [httpd]
        listenUrl = proxy-https://*:8080/
    
    • 1

相关问题

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve