gpt4 book ai didi

linux - 绑定(bind) Monit 使用端口 443

转载 作者:太空宇宙 更新时间:2023-11-04 05:59:51 24 4
gpt4 key购买 nike

我使用 Monit 进行以下配置:

set httpd port 2812
allow 0.0.0.0/0.0.0.0
allow md5 /etc/apache2/.htpasswd USERX
ssl enable
pemfile /etc/monit/pemfile-DOMAIN.pem

我无法更改为 443 或 80 端口,但我只想在 443 上使用 https。如果我尝试以下操作,则会收到此错误:

[CEST Apr 26 23:08:33] error    : Cannot listen -- Address already in use
[CEST Apr 26 23:08:33] error : HTTP server: not available -- could not create a server socket at port 443 -- Address already in use

最佳答案

如果端口 443 已被 Apache 使用,则无法监听。

您应该将 Monit 绑定(bind)到另一个端口(例如 8443)。

如果您不想键入带有端口的域,也可以。你应该看看 Apache 的 mod_proxy:https://httpd.apache.org/docs/trunk/mod/mod_proxy.html

基本上,让 Apache 在端口 443 上监听 monit.example.com,并将这些请求转发到端口 8443 上的本地主机(Monit 实际运行的位置)。

关于linux - 绑定(bind) Monit 使用端口 443,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50052046/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com