Pgadmin4:无效HTTP版本 '无效的HTTP版本: '上[email protected] HTTP / 1.0''

问题描述 投票:0回答:1
--------------------------------------------------------
| Pgadmin version           |          4.3.5           |
--------------------------------------------------------
| PostgreSQL server version | pg_ctl (PostgreSQL) 11.1 |
--------------------------------------------------------
| Docker image              |      dpage/pgadmin4      |
--------------------------------------------------------

我跑进码头工人容器使用PGAdmin4问题。当我连接到我的host`s机PostgreSQL服务器,并试图查看/编辑数据 - 我得到这样的错误:https://pasteboard.co/HO1w7jS.png

注意:

  • 我有PostgreSQL缺省配置中,除了listen_addresses = '127.0.0.1, 172.17.0.1
  • pgAdmin的容器是后面的nginx代理mydomain.tld -> localhost:5050

据我了解,这是在PostgreSQL HTTP API的一个问题。但我不是专家,无论是在PostgreSQL的也不pgAdmin的。也许有人有办法解决这个问题?

postgresql docker pgadmin pgadmin-4
1个回答
0
投票

问题是在nginx的位置正则表达式。 Nginx的莫名其妙奇怪截断URL参数。

也许这是由于使用这个补丁:https://stackoverflow.com/a/50515636/9547899(我用它来请求重定向到pgAdmin的一个子目录)

它是:

location ~ /PostgreSQL(.*)$ {
    proxy_pass          http://127.0.0.1:23301$1;

它变成了:

location ~ PostgreSQL {
    proxy_pass          http://127.0.0.1:23301;
© www.soinside.com 2019 - 2024. All rights reserved.