How one is able to proxy the requests (or the API calls) of an Angular app hosted on Nginx towards backend running on a docker container having another port value (the Angular app is also dokcerized)?
Currently, I have an nginx.conf file and copying it to /etc/nginx/conf.d/default.conf, but cannot get the results from the backend. This is nginx.conf file:
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html index.htm;
location / {
try_files $uri $uri/ /index.html = 404;
}
location /api/ {
proxy_pass http://0.0.0.0:8080/api/;
}
}