502 Bad Gateway for nginx configuration that runs inside a docker container

44 views Asked by At

Current Nginx configuration

I'm trying to deploy a web app using a VPS. I currently have two Docker containers, one is running Angular + Nginx (Angular is running on 4200) and the other is running the Spring Boot backend and the PostgreSQL. (Spring Boot is on port 8080). I generated a free certificate using Certbot and the containers run ok until I make a request to my page. I get 502. What could be the issue?

I tried changing the proxy pass localhost, https instead of http, the address of my VPS instead of localhost but nothing seems to be working.

0

There are 0 answers