4x4Anarchy

joined 11 months ago
[–] [email protected] 1 points 11 months ago

The docs are pretty straightforward

https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/

Here's a barebones of what my nginx.conf looks like to do a reverse proxy

worker_processes 1;

error_log nginx_error.log;

events { worker_connections 1024; }

http { server { server_name mydomain.com www.mydomain.com; location / { proxy_pass http://localhost:9000; } listen 80; }

but if you're running nginx inside a docker container you also need to expose the port in the container with -p flag. So your run command is something like docker run ... -p 80:80