我需要为我目前正在工作的网站提供一个评论部分。我找到了commento.io,一个可以自我托管的评论平台。
他们提供了一个自我托管的教程:https://docs.commento.io/installation/self-hosting/on-your-server/release-binaries.html没有真正的服务器技术背景,我觉得这个教程对设置有点简单。
准确地说,我很难弄清楚如何配置DNS (和防火墙)设置,以便能够访问服务器,如本例所示:
在启动Commento之前,您需要设置一些非可选配置。在本例中,让我们假设Commento实例将在服务器上运行,并且可以在
commento.example.com上使用。在启动Commento之前,还需要一个可用的PostgreSQL服务器。假设服务器可以在postgres.example.com上使用5432端口上的凭据username:password。创建一个名为commento的数据库。设置环境变量以在端口COMMENTO_POSTGRES=postgres://username:password@postgres.example.com:5432/commento?sslmode=disable上的commento.example.com上启动Commento服务器:$ export COMMENTO_ORIGIN=http://commento.example.com:8080 $ export COMMENTO_PORT=8080 $ export COMMENTO_PORT=8080$exportCOMMENTO_CDN_PREFIX=$COMMENTO_ORIGIN
我所拥有的:
username:password安装commento的数据库example.com的域,具有到我服务器的IP的A记录我不明白的是:
postgres.example.com访问数据库,甚至需要为此使用DNS,或者我可以通过postgres://username:password@:5432访问它吗?commento.example.com访问逗号实例?commento.example.com和postgres.example.com之间的交换?发布于 2020-04-26 21:42:15
要使postgres从不同的主机上可用,您需要在postgresql.conf中的一个侦听行中列出可从客户端系统访问的ip地址。以及允许端口5432上的TCP连接所需的防火墙规则。
https://serverfault.com/questions/1014027
复制相似问题