Skip to content
This repository was archived by the owner on Oct 17, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 2 additions & 44 deletions src/api/server/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,53 +87,14 @@ interact with the local node's configuration.
"socket_options": "[{sndbuf, 262144}, {nodelay, true}]",
"server_options": "[{recbuf, undefined}]"
},
"daemons": {
"auth_cache": "{couch_auth_cache, start_link, []}",
"db_update_notifier": "{couch_db_update_notifier_sup, start_link, []}",
"external_manager": "{couch_external_manager, start_link, []}",
"httpd": "{couch_httpd, start_link, []}",
"query_servers": "{couch_query_servers, start_link, []}",
"stats_aggregator": "{couch_stats_aggregator, start, []}",
"stats_collector": "{couch_stats_collector, start, []}",
"uuids": "{couch_uuids, start, []}",
"view_manager": "{couch_view, start_link, []}"
},
"httpd": {
"allow_jsonp": "false",
"authentication_handlers": "{couch_httpd_auth, cookie_authentication_handler}, {couch_httpd_auth, default_authentication_handler}",
"bind_address": "192.168.0.2",
"default_handler": "{couch_httpd_db, handle_request}",
"max_connections": "2048",
"port": "5984",
"secure_rewrites": "true",
"vhost_global_handlers": "_utils, _uuids, _session, _users"
},
"httpd_db_handlers": {
"_changes": "{couch_httpd_db, handle_changes_req}",
"_compact": "{couch_httpd_db, handle_compact_req}",
"_design": "{couch_httpd_db, handle_design_req}",
"_temp_view": "{couch_httpd_view, handle_temp_view_req}",
"_view_cleanup": "{couch_httpd_db, handle_view_cleanup_req}"
},
"httpd_design_handlers": {
"_info": "{couch_httpd_db, handle_design_info_req}",
"_list": "{couch_httpd_show, handle_view_list_req}",
"_rewrite": "{couch_httpd_rewrite, handle_rewrite_req}",
"_show": "{couch_httpd_show, handle_doc_show_req}",
"_update": "{couch_httpd_show, handle_doc_update_req}",
"_view": "{couch_httpd_view, handle_view_req}"
},
"httpd_global_handlers": {
"/": "{couch_httpd_misc_handlers, handle_welcome_req, <<\"Welcome\">>}",
"_active_tasks": "{couch_httpd_misc_handlers, handle_task_status_req}",
"_all_dbs": "{couch_httpd_misc_handlers, handle_all_dbs_req}",
"_config": "{couch_httpd_misc_handlers, handle_config_req}",
"_replicate": "{couch_httpd_misc_handlers, handle_replicate_req}",
"_session": "{couch_httpd_auth, handle_session_req}",
"_stats": "{couch_httpd_stats_handlers, handle_stats_req}",
"_utils": "{couch_httpd_misc_handlers, handle_utils_dir_req, \"/usr/share/couchdb/www\"}",
"_uuids": "{couch_httpd_misc_handlers, handle_uuids_req}",
"favicon.ico": "{couch_httpd_misc_handlers, handle_favicon_req, \"/usr/share/couchdb/www\"}"
"secure_rewrites": "true"
}
},
"log": {
"writer": "file",
Expand All @@ -144,9 +105,6 @@ interact with the local node's configuration.
"query_server_config": {
"reduce_limit": "true"
},
"query_servers": {
"javascript": "/usr/bin/couchjs /usr/share/couchdb/server/main.js"
},
"replicator": {
"max_http_pipeline_size": "10",
"max_http_sessions": "10"
Expand Down
232 changes: 0 additions & 232 deletions src/config/http-handlers.rst

This file was deleted.

35 changes: 18 additions & 17 deletions src/config/http.rst
Original file line number Diff line number Diff line change
Expand Up @@ -307,23 +307,22 @@ HTTP Server Options

.. _config/ssl:

Secure Socket Level Options
===========================
HTTPS (SSL/TLS) Options
=======================

.. config:section:: ssl :: Secure Socket Level Options
.. config:section:: ssl :: HTTPS (SSL/TLS) Options

CouchDB supports SSL natively. All your secure connection needs can now be
served without needing to set up and maintain a separate proxy server that
handles SSL.
CouchDB supports TLS/SSL natively, without the use of a proxy server.

SSL setup can be tricky, but the configuration in CouchDB was designed to
HTTPS setup can be tricky, but the configuration in CouchDB was designed to
be as easy as possible. All you need is two files; a certificate and a
private key. If you bought an official SSL certificate from a certificate
private key. If you have an official certificate from a certificate
authority, both should be in your possession already.

If you just want to try this out and don't want to pay anything upfront,
you can create a self-signed certificate. Everything will work the same,
but clients will get a warning about an insecure certificate.
If you just want to try this out and don't want to go through the hassle of
obtaining an official certificate, you can create a self-signed certificate.
Everything will work the same, but clients will get a warning about an insecure
certificate.

You will need the `OpenSSL`_ command line tool installed. It probably
already is.
Expand All @@ -340,14 +339,11 @@ Secure Socket Level Options
Now, you need to edit CouchDB's configuration, by editing your
``local.ini`` file. Here is what you need to do.

At first, :option:`enable the HTTPS daemon <daemons/httpsd>`::

[daemons]
httpsd = {chttpd, start_link, [https]}

Next, under the ``[ssl]`` section set up the newly generated certificates::
Under the ``[ssl]`` section, enable HTTPS and set up the newly generated
certificates::

[ssl]
enable = true
cert_file = /etc/couchdb/cert/couchdb.pem
key_file = /etc/couchdb/cert/privkey.pem

Expand Down Expand Up @@ -386,6 +382,11 @@ Secure Socket Level Options

All done.

For performance reasons, and for ease of setup, you may still wish to
terminate HTTPS connections at your load balancer / reverse proxy, then use
unencrypted HTTP between it and your CouchDB cluster. This is a recommended
approach.

.. _`certificates HOWTO`: http://www.openssl.org/docs/HOWTO/certificates.txt
.. _OpenSSL: http://www.openssl.org/

Expand Down
1 change: 0 additions & 1 deletion src/config/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,5 @@ Configuring CouchDB
logging
replicator
query-servers
http-handlers
services
misc
8 changes: 4 additions & 4 deletions src/config/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,11 @@ improve configuration readability.
without modifying that file, you may override in `local.ini`, but without
any value::

[httpd_global_handlers]
_all_dbs =
[compactions]
_default =

This could be read as: "remove the `_all_dbs` parameter from the
`httpd_global_handlers` section if it was ever set before".
This could be read as: "remove the `_default` parameter from the
`compactions` section if it was ever set before".

The semicolon (``;``) signals the start of a comment. Everything after this
character is ignored by CouchDB.
Expand Down
Loading