apache / couchdb-fauxton

Fauxton is the new Web UI for CouchDB

Home Page:https://github.com/apache/couchdb-fauxton

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to access Fauxton (Couchdb) 5984 in a Docker Container within a Azure Ubuntu Linux VM?

kkadapa opened this issue · comments

In our Azure VM there are two docker containers port 3000 is the webapp and port 5984 is the couchdb. I opened the 3000 and 5984 ports in firewall, tried all suggestions, I am unable to get the FauxtonUI i keep getting 502 bad gateway. I changed the binding address of local.ini to 0.0.0.0 and restarted couchdb but that didn't help.

The following is my nginx default

`
upstream webapp {
server 127.0.0.1:3000;
}
upstream couchdb {
server 127.0.0.1:5984;
}

server {
listen 80;
listen [::]:80;

    # SSL configuration
    #
    listen 443 ssl default_server;
    listen [::]:443 ssl default_server;

    ssl on;
    ssl_certificate /etc/nginx/sites-available/xxxxxx.crt;
    ssl_certificate_key /etc/nginx/sites-available/xxxxx.key;

    root /var/www/html;
    server_name mindlampdev.eastus2.cloudapp.azure.com;

         location / {               
            proxy_pass http://localhost:3000;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection 'upgrade';
            proxy_set_header Host $host;
    
          }

         location /couchdb {
             rewrite /couchdb/(.*) /$1 break;
             proxy_pass http://localhost:5984;
             proxy_redirect off;
             proxy_buffering off;
             proxy_set_header Host $host;
             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
             auth_basic "Access restricted";
             auth_basic_user_file /etc/nginx/.htpasswd;
          }

}
`