minus-square4x4Anarchy@alien.topBtoSelf-Hosted Main@selfhosted.forum•Can't get Nginx reverse proxy to worklinkfedilinkEnglisharrow-up1·1 year agoThe 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 linkfedilink
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
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 likedocker run ... -p 80:80