minus-squarez1n@lmmy.co.zatoSelfhosted@lemmy.world•Q: Lemmy and Mastodon instances behind existing reverse proxylinkfedilinkEnglisharrow-up1·edit-21 year agoMy Nginx is pointing to the “proxy” container (the one with port 1236 in your docker compose). My Nginx location looks something like the below. Obviously there is more for SSL termination etc. Let me know if this doesn’t make any sense. TIP: I’m using 0.0.0.0 since 127.0.0.1 won’t work (I can explain this further if needs be). location / { proxy_pass http://0.0.0.0:1236; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } linkfedilink
My Nginx is pointing to the “proxy” container (the one with port 1236 in your docker compose).
My Nginx location looks something like the below. Obviously there is more for SSL termination etc. Let me know if this doesn’t make any sense.
TIP: I’m using 0.0.0.0 since 127.0.0.1 won’t work (I can explain this further if needs be).
location / { proxy_pass http://0.0.0.0:1236; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }