Nginx and Metabase

ptmuldoon

Well-Known Member
Apr 28, 2012
36
2
48
I'm trying to experiment with Metabase to see if is something that will benefit myself in some work projects, but having some issues connecting to the the container I created it for.

In summary, I followed these instructions here. hXXps://www.metabase.com/docs/latest/operations-guide/running-metabase-on-debian.html

1. I created a Ubuntu 20 container and follow those instructions above to install Metabase
2. I get status of running when I check the metabase status, and all seems good.

But am having some issues with nginx. My container has an IP address of 192.168.11.201. But whenever I try that address from any device on the Lan I only get the Welcome to Nginx screen.

And my nginx info looks like the following:

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

     server_name localhost;

     location / {
         allow 192.168.11.0/24;
         proxy_pass http://127.0.0.1:3000;
     }
 }

And ideas what I need to fix?
 
Hi,

I am not sure what your setup looks like exactly, but I think I can spot at least one issue.

In your Nginx config you set server_name to localhost. Nginx will listen on port 80 for requests to "localhost" and then pass them to 127.0.0.1:3000. So now if you try to connect to the container via the IP nginx will not sent the request to "http://127.0.0.1:3000" since you haven't requested the server with the name "localhost" but a server with the name set to the IP of the container. If you try to request the server "localhost" your machine will route the request to itself though (at least usually) and, thus, Nginx won't be reached.

So what you'd want to do is likely replace localhost with either the IP of the container or you could not set it at all.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!