Skip to content

Instantly share code, notes, and snippets.

@jlyonsmith
Forked from robbiet480/couchdb.conf
Created November 16, 2020 05:28
Show Gist options
  • Select an option

  • Save jlyonsmith/b06df6976a06a5c2e2cd4a86d6f0e0f1 to your computer and use it in GitHub Desktop.

Select an option

Save jlyonsmith/b06df6976a06a5c2e2cd4a86d6f0e0f1 to your computer and use it in GitHub Desktop.

Revisions

  1. @robbiet480 robbiet480 created this gist Feb 11, 2016.
    32 changes: 32 additions & 0 deletions couchdb.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@
    server {
    listen 80;
    server_name yournamehere.com;
    return 301 https://$host$request_uri;
    }

    server {
    listen 443 ssl;
    server_name yournamehere.com;

    root /usr/share/nginx/html;

    ssl on;
    ssl_certificate /etc/letsencrypt/live/yournamehere.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/yournamehere.com/privkey.pem;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
    ssl_session_cache shared:SSL:1m;

    location / {
    proxy_pass http://localhost:5984;
    proxy_redirect off;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Ssl on;
    }

    location ~ /.well-known {
    allow all;
    }
    }