Hi,
I’m trying to configure Caddy to serve as reverse to Tiny Tiny RSS (https://tt-rss.org) running in a Docker container. It kind a work, but it still has an annoying behaviour.
I currently have:
domain.com {
root /srv
redir /tt-rss /tt-rss/
proxy /tt-rss/ ttrss-container {
without /tt-rss
transparent
}
}
I can access it at domain.com/tt-rss, but after I login instead of being redirected to domain.com/tt-rss/index.php I’m redirected to Domain.com. It’s not that of a problem because if I go again to domain.com/tt-rss/ it then work as expected. So it’s just the redirection after login that does not work correctly.
I searched the app code (https://git.tt-rss.org/git/tt-rss/src/master/include/sanity_check.php#L17) and it seems it is because php variables $_SERVER[“HTTP_HOST”] and $_SERVER[“REQUEST_URI”] don’t contain the ‘tt-rss’ part. I suppose it has to do with the ‘without /tt-rss’ part in Caddyfile.
A nginx example I found that supposedly work:
location /tt-rss/ {
index index.php;
rewrite /tt-rss(.*) /$1 break;
proxy_pass http://localhost:8000;
}
I also found this other nginx config on another forum:
location /ttrss/ {
proxy_pass http://192.168.20.17/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
I seem to understand that the ‘transparent’ directive is an alias for the directives in the later example.
Would I need to do a rewrite directive as in the first example?
I searched the doc and forums but as I don’t know much of webservers and reverse proxy I’m really lost here.
Is there anything I could do to solve that?
Thanks a lot.