You have a point: reconstructing my setup from the previous information in the thread and my remark that I’ve got something that’s “pretty much” like that is too much to expect.
I was hoping for @PolGZ to share their setup in more detail, but still, here goes.
I’ll use x.y.z as the SSL-enabled host name, and consequently https://x.y.z/tt-rss/ would be where I hope to have tt-rss running.
On the one hand, I have a docker-compose setup just like instructed, with TTRSS_SELF_URL_PATH=https://x.y.z/tt-rss/, and HTTP_PORT=8280.
The “Bad Gateway” error is from my second nginx instance, which I’ve configured as follows in app.conf:
server {
listen [::]:443 ssl;
listen 443 ssl;
server_name x.y.z;
server_tokens off;
ssl_certificate /etc/letsencrypt/live/x.y.z/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/x.y.z/privkey.pem;
location /tt-rss/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://localhost:8280/tt-rss/;
break;
}
}
This second nginx runs in a docker-compose setup that currently just consists of one image (planning to add certbot for automated certificate updates once I have this going with the manually generated certificate):
version: '3'
services:
nginx:
image: nginx
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./conf.d:/etc/nginx/conf.d
- ./letsencrypt:/etc/letsencrypt
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
Now, a request for https://x.y.z/tt-rss/ will yield the following error message from the second nginx:
[error] 10#10: *7 connect() failed (111: Connection refused) while connecting to upstream, client: a.b.c.d, server: x.y.z, request: "GET /tt-rss/ HTTP/1.1", upstream: "http://127.0.0.1:8280/tt-rss/", host: "x.y.z"
And again, I must be missing something obvious. Grateful for any advice.