【问题标题】:how disable http access in couchdb如何在 couchdb 中禁用 http 访问
【发布时间】:2016-04-11 15:04:22
【问题描述】:

我在 MacOSX El Captain 上使用 CouchdDB 并尝试使用 https。 local.ini 文件中的改编是:
[ssl]
verify_ssl_certificates = 假
ssl_certificate_max_depth = 1
cert_file = /opt/local/etc/couchdb/certs/localhost.crt
key_file = /opt/local/etc/couchdb/certs/localhost.key
端口 = 6984

但是我可以在多远的范围内阻止通过 5984 端口的访问?

【问题讨论】:

    标签: ssl couchdb


    【解决方案1】:

    在 [daemons] 下,删除(如果存在,或将其注释掉):

    httpd={couch_httpd, start_link, []}
    

    然后放入,

    httpsd = {couch_httpd, start_link, [https]}
    

    然后,重新启动 couchdb。

    【讨论】:

    • 以上只是给CouchDB添加了https,并没有禁用http
    【解决方案2】:

    您可以通过防火墙禁用对 http 端口 5984 的访问。

    例如,在 CentOS 中,

    iptables --append INPUT --protocol tcp --sport 5984 --dport 5984 --jump DROP
    

    相同的想法可以应用于每个操作系统。在 MacOS 中,您可以使用系统偏好设置 > 安全 > 防火墙用户界面来阻止端口。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-05-01
      • 2011-08-16
      • 1970-01-01
      • 2012-04-30
      • 1970-01-01
      • 1970-01-01
      • 2013-05-22
      • 1970-01-01
      相关资源
      最近更新 更多