Skip to content

Unable to reverse proxy to localhost #555

Open
@gururise

Description

@gururise

Checklist

What is troubling you?

I have Nginx Proxy Manager as my 1st point of entry into my Virtual Private Server for 80,443 which then routes out to the various containers I have running on the same server. I have the Forward Hostname / IP set to the IP address of my VPS and the port of the container.

Since Docker exposes all the container ports to the open internet, I want to bind my containers ports to localhost to not have a bunch of ports exposed on my VPS: ie. Port configuration 127.0.0.1:3001 -> 80/tcp

Unfortunately, when I do this, I am no longer able to reverse proxy to my containers. On my VPS, I can verify I am able to access 127.0.0.1:3000 but the reverse proxy no longer works.
I've even tried setting the Forward Hostname/IP and port to 127.0.0.1: but that results in a 502 error.

I figure this is because the nginx reverse proxy container cannot access localhost in that way, but even using the IP address of my VPS no longer works.

Does anyone have a solution?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions