嘿,
我能够在服务器上通过 Plesk 为两个不同的域名安装两个 Discourse 容器。两者都在运行,只是出现了 502 错误。
错误日志显示:
2020/04/18 13:48:45 [error] 61#61: *125 upstream prematurely closed connection while reading response header from upstream, client: 172.17.0.1, server: _, request: "GET / HTTP/1.0", upstream: "http://127.0.0.1:3000/", host: "my.domain"
当我只运行一个容器时,这个错误根本不会出现。我尝试了一些设置,但未能解决问题。据我理解,这与 Nginx 有关,也可能是因为容器的 DOCKER_HOST_IP 相同。遗憾的是,我找不到在哪里可以更改这个值。在 Plesk 中对该值进行的编辑对日志没有产生任何影响。如果有人能帮我解决这个问题,或者至少给我一些清晰的建议,告诉我遗漏了哪些设置,我将不胜感激。
另外,抱歉我的英语不好,希望我的句子表达得通顺。
Ok, i was able to fix my issue. Here how i was able to fix it:
Many solutions for this error message was timeout related, so i tried the same fix. But it didnt make any changes, here is how i set up the additional nginx directives initialy:
location / {
proxy_pass [https://localhost:8500/;](http://)
proxy_set_header Host $http_host;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect https://localhost:8500/ https://my.domain;
proxy_read_timeout 300s;
proxy_connect_timeout 75s;
}
But like i’ve said, this did nothing. So i kept on searching, till i found this link:
this suggest to put the timout paramters just into the textfield, so i did:
The Proxy is handled via the Plesk Docker Plugin.
Now everything is working perfect. Hope this helps someone else struggeling with the same issue.
1 个赞
system
(system)
关闭
2020 年5 月 19 日 19:29
3
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.