如何在Ubuntu上运行的CouchDB上启用SSL?

时间:2015-12-04 12:50:28

标签: ssl curl couchdb ubuntu-14.04

我想我已经完成了所有工作,也许我错过了一些Apache配置。

我的couchdb / local.ini:

[ssl]
cert_file = /home/ubuntu/keys/ssl_certificate.crt
key_file = /home/ubuntu/keys/couchdb.nossocatalogo.key
verify_ssl_certificates = false
cacert_file = /home/ubuntu/keys/intermediario.crt
ssl_certificate_max_depth = 1

这是我在当地卷曲时得到的:

$ curl -k -v https://127.0.0.1:6984/
* Hostname was NOT found in DNS cache
*   Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 6984 (#0)
* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server key exchange (12):
* SSLv3, TLS handshake, Request CERT (13):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using ECDHE-RSA-AES256-SHA384
* Server certificate:
*    subject: OU=Domain Control Validated; CN=couchdb.nossocatalogo.com
*    start date: 2015-12-03 12:52:50 GMT
*    expire date: 2016-12-03 12:52:50 GMT
*    issuer: C=BE; O=GlobalSign nv-sa; CN=AlphaSSL CA - SHA256 - G2
*    SSL certificate verify ok.
> GET / HTTP/1.1
> User-Agent: curl/7.35.0
> Host: 127.0.0.1:6984
> Accept: */*
> 
< HTTP/1.1 200 OK
* Server CouchDB/1.6.1 (Erlang OTP/R16B03) is not blacklisted
< Server: CouchDB/1.6.1 (Erlang OTP/R16B03)
< Date: Fri, 04 Dec 2015 12:33:38 GMT
< Content-Type: text/plain; charset=utf-8
< Content-Length: 127
< Cache-Control: must-revalidate
< 
{"couchdb":"Welcome","uuid":"67f735de026497422ce78b7184b4864d","version":"1.6.1","vendor":{"name":"Ubuntu","version":"14.04"}}
* Connection #0 to host 127.0.0.1 left intact

但是从外面来看,我仍然有问题。 我无法通过https://couchdb.nossocatalogo.com:6984/

访问

我错过了什么吗?

1 个答案:

答案 0 :(得分:0)

似乎与Ubuntu 14.04和CouchDB上的SSL存在冲突。 我在阅读本页的“问题和问题”部分时发现了这一点: https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=48203146

所以,为了解决这个问题,我升级了Ubuntu版本,并按照此处的教程进行操作: http://www.unixmen.com/installing-apache-couchdb-databse-ubuntu-15-04/

现在它正在工作!