Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kkadapa opened this issue Oct 31, 2020 · 0 comments

Comments

@kkadapa
Copy link

kkadapa commented Oct 31, 2020

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;
          }

}
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant