I am trying to use a docked version of nginx as a proxy for my node application (ExpressJS). Without any configuration for nginx and publishing port 80 for the container, I can see the default nginx landing page. Therefore, I know that a lot works.
Now I can connect the site-support directory containing the configuration for proxy_pass localhost:3000 . I have a node application running locally (not in any Docker container) and I can access it through port 3000 (i.e. localhost:3000 ). However, I would suggest that with the launch of the nginx container mapped to port 80 and proxying my localhost: 3000, I could see my very simple (hello world) application. Instead, I get 502.
Do I need to transfer something to the docker? Perhaps this is a nginx configuration error? Here is my nginx configuration:
server { listen 0.0.0.0:80; server_name localhost; location / { proxy_pass http://localhost:3000; } }
I tried using this question , but it didn't seem to help. That is, if I am not doing something completely wrong.
adam-beck
source share