Running tracd
and accessing its web directly works fine.
However, I want it sitting behind nginx, accessible by going to example.com/trac/
.
To that end, I've made the following change to the nginx configuration:
location /trac/ {
proxy_pass http://127.0.0.1:3456/; # tracd listens there
proxy_redirect default;
proxy_set_header Host $host;
}
Visiting example.com/trac/
now shows me a broken Trac homepage, where none of the CSS, JS or image files get loaded because all of those other requests get sent to something like example.com/css
, instead of example.com/trac/css
.
How can I fix this?
How do I make Trac realize it's in example.com/trac/
, and not example.com/
?
Thanks!
Edit: I've set the following trac.ini
settings and restarted tracd
, but the problem persists:
base_url = https://example.com/trac/
use_base_url_for_redirect = true