When we connect to CouchDB using localhost or 127.0.0.1, we get the expected response:

However, when we connect using the server's host/domain name (or IP address), it refuses the connection attempt:

A quick check with netstat is all it takes to see what's causing the problem.

The reason why it's refusing connection attempts is because CouchDB is listening only in the 127.0.0.1 or localhost interface.

What we'd like it to do is to listen to all the interfaces (including its server's IP address and host/domain name). And that's designated as 0.0.0.0, like so:

To do that, we open /etc/couchdb/default.ini, look for the bind_address variable, and change 127.0.0.1 to 0.0.0.0:

Save and close the edited file, then restart CouchDB:

This time when we connect to CouchDB using the host/domain name or IP address, we get a response: