I have to run a container running nginx as a reverse proxy using podman.
Dockerfile is as follows:
FROM nginx
COPY nginx/* /etc/nginx/
Where basically I have a default.conf file under conf.d which is like this:
server {
listen 80;
server_name my-server;
client_max_body_size 200M;
location / {
root /usr/share/nginx/html;
}
location /api {
proxy_set_header X-FORWARDED-FOR $remote_addr;
proxy_pass http://backend:3300/api;
}
error_page 404 /;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
where backend is an alias for another container with a rest server running on the same network that contains the proxy.
I setup the network with the command:
podman create custom-network
then I run the following command:
podman run -d --name=frontend -p 80:80 --network=custom-network:alias=frontend -v ./www:/usr/share/nginx/html -v ./logs:/var/log/nginx localhost/my-www:latest
At this point everything is up and running and I can open my application from the browser in the same machine, but it is unreachable from another computer on the same network.
I already turned off windows firewall on every network, but still nothing.
Is there a podman command or a configuration tweak that make nginx container reachable from outside?