Advertisement
Guest User

Untitled

a guest
Feb 14th, 2017
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.40 KB | None | 0 0
  1. var options = {
  2. key: fs.readFileSync(__dirname + '/keys/spdy-key.pem'),
  3. cert: fs.readFileSync(__dirname + '/keys/spdy-cert.pem'),
  4. ca: fs.readFileSync(__dirname + '/keys/spdy-ca.pem'),
  5. };
  6.  
  7. [httpd]
  8. ;port = 5984
  9. ;bind_address = 127.0.0.1
  10. ; Options for the MochiWeb HTTP server.
  11. ;server_options = [{backlog, 128}, {acceptor_pool_size, 16}]
  12. ; For more socket options, consult Erlang's module 'inet' man page.
  13. ;socket_options = [{recbuf, 262144}, {sndbuf, 262144}, {nodelay, true}]
  14.  
  15. ; Uncomment next line to trigger basic-auth popup on unauthorized requests.
  16. WWW-Authenticate = Basic realm="administrator"
  17.  
  18. ; Uncomment next line to set the configuration modification whitelist. Only
  19. ; whitelisted values may be changed via the /_config URLs. To allow the admin
  20. ; to change this value over HTTP, remember to include {httpd,config_whitelist}
  21. ; itself. Excluding it from the list would require editing this file to update
  22. ; the whitelist.
  23. ;config_whitelist = [{httpd,config_whitelist}, {log,level}, {etc,etc}]
  24.  
  25. [httpd_global_handlers]
  26. ;_google = {couch_httpd_proxy, handle_proxy_req, <<"http://www.google.com">>}
  27.  
  28. [couch_httpd_auth]
  29. ; If you set this to true, you should also uncomment the WWW-Authenticate line
  30. ; above. If you don't configure a WWW-Authenticate header, CouchDB will send
  31. ; Basic realm="server" in order to prevent you getting logged out.
  32. require_valid_user = true
  33.  
  34. [log]
  35. ;level = debug
  36.  
  37. [log_level_by_module]
  38. ; In this section you can specify any of the four log levels 'none', 'info',
  39. ; 'error' or 'debug' on a per-module basis. See src/*/*.erl for various
  40. ; modules.
  41. ;couch_httpd = error
  42.  
  43.  
  44. [os_daemons]
  45. ; For any commands listed here, CouchDB will attempt to ensure that
  46. ; the process remains alive. Daemons should monitor their environment
  47. ; to know when to exit. This can most easily be accomplished by exiting
  48. ; when stdin is closed.
  49. ;foo = /path/to/command -with args
  50.  
  51. [daemons]
  52. ; enable SSL support by uncommenting the following line and supply the PEM's below.
  53. ; the default ssl port CouchDB listens on is 6984
  54. httpsd = {couch_httpd, start_link, [https]}
  55.  
  56. [ssl]
  57. cert_file = /srv/www/[appname]/keys/cert.pem
  58. key_file = /srv/www/[appname]/keys/key.pem
  59. ;password = somepassword
  60. ; set to true to validate peer certificates
  61. ;verify_ssl_certificates = true
  62.  
  63. ; Path to file containing PEM encoded CA certificates (trusted
  64. ; certificates used for verifying a peer certificate). May be omitted if
  65. ; you do not want to verify the peer.
  66. ; cacert_file = /srv/www/[appname]/keys/ca.pem
  67. ; The verification fun (optional) if not specified, the default
  68. ; verification fun will be used.
  69. ;verify_fun = {Module, VerifyFun}
  70. ; maximum peer certificate depth
  71. ssl_certificate_max_depth = 1
  72.  
  73. * About to connect() to 127.0.0.1 port 6984 (#0)
  74. * Trying 127.0.0.1...
  75. * Adding handle: conn: 0x181eab0
  76. * Adding handle: send: 0
  77. * Adding handle: recv: 0
  78. * Curl_addHandleToPipeline: length: 1
  79. * - Conn 0 (0x181eab0) send_pipe: 1, recv_pipe: 0
  80. * Connected to 127.0.0.1 (127.0.0.1) port 6984 (#0)
  81. * successfully set certificate verify locations:
  82. * CAfile: none
  83. CApath: /etc/ssl/certs
  84. * SSLv3, TLS handshake, Client hello (1):
  85. * Unknown SSL protocol error in connection to 127.0.0.1:6984
  86. * Closing connection 0
  87. curl: (35) Unknown SSL protocol error in connection to 127.0.0.1:6984
  88.  
  89. var options = {
  90. key: fs.readFileSync(__dirname + '/keys/spdy-key.pem'),
  91. cert: fs.readFileSync(__dirname + '/keys/spdy-cert.pem'),
  92. ca: fs.readFileSync(__dirname + '/keys/spdy-ca.pem'),
  93. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement