This is the nginx.conf file for my external proxy:
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name ;
include /config/nginx/ssl.conf;
location / {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
# set $upstream_app lemmy;
set $upstream_app proxy;
set $upstream_port 8536;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
# 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;
client_max_body_size 50M;
}
}
access_log /var/log/nginx/access.log combined;
You’ll need to change to the appropriate value. I’m forwarding requests to the proxy container referenced by the compose file
Added internal nginx and external proxy configs to a reply. I didn’t make any changes to the postgres config.
Hope it helps