I found a problem. A harmless looking rewrite rule overwrites $ request_uri as the first line and modifies the $ uri variable as part of the execution of the request. $ request_uri does not change when overwriting. Therefore, when I included this variable in the proxy_pass location, I did not correctly include the edited url with / couchdb / deleted.
Change proxy_pass line to:
proxy_pass http://myusername.cloudant.com$uri;
Now it works without problems. This was not an SSL problem, but a problem with basic authentication, as well as another problem with the HTTP header and a problem with Cloudant. All this was connected with the URI to which I sent my request.
source share