brygphilomena@lemmy.world 1 year ago
I wrote this a while back. Maybe it can help reddit.com/…/tutorial_reverse_proxy_with_nginx/
502 usually means it’s having a hard time hitting the service on the back end. Are you able to access listmonk directly without the reverse proxy? What is the URL I. The browser when you do that?
Is listmonk on the same server as nginx? Is nginx running in a container? If nginx is running in a container, 127.0.0.1 would try to load from inside the nginx container which isn’t where listmonk is. Use the LAN IP address of the docker host listmonk is on instead of 127.0.0.1.
MaximilianKohler@lemmy.world 1 year ago
Thanks, I checked out your link. I think my most recent comment below answers some of your questions. lemmy.world/comment/5586470
Besides the info I put in the OP, I’m not sure what else you’re asking.
No idea what this is, so I looked it up howtogeek.com/…/how-to-get-a-docker-containers-ip… and ran
docker ps
then put the container ID at the end of thisdocker inspect -f ‘{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}’ docker-container-ID
. It output an IP address which I used forproxy_pass http://docker-IP:5870;
, restarted nginx, and nothing seems to have changed.brygphilomena@lemmy.world 1 year ago
Not the docker container IP. The IP of the machine you are running docker itself on. Nginx is running in a container, it’s not allowed to talk to the other docker container IP directly and it has a separate network stack from the listmonk container, so 127.0.0.1 only goes back to nginx.
Say your machine that you are running docker on is 192.168.0.67, the listmonk docker container is 172.16.0.89, and nginx container has an IP of 172.16.0.34.
Your nginx config would need the proxy to point to 192.168.0.67:5870.
Then make sure you don’t have ufw or some similar firewall blocking the connection from nginx to listmonk.
MaximilianKohler@lemmy.world 1 year ago
I don’t think it is. On my other machine it’s running in the docker container, but not this one.
Using serverIP:5870 has the same result as using listmonk.mysite.com:5870. It loads a broken page …githubusercontent.com/…/280444708-2d3a3007-1b37-… with broken links. IE: the URLs are
http://localhost:9000/subscription/form
.