Relative links in trac


I’d like to use nginx for running small project site with trac. I have
VPS with apache on 80 and nginx on 8080 with an address,
the project site (virtual host) and I’d like to
have trac on

My virtual host looks like that:

server {
listen 8080;

    access_log  /var/log/nginx/skrypt.access.log;
    error_log   /var/log/nginx/skrypt.error.log;

    location / {
            root   /var/www/skrypt/www;
            index  index.html index.htm;

    location /trac/ {


So here I have problem with trac/proxy: all links within trac are
relative to virtual host (, but that should be
relative to trac directory ( So link to
login points to instead of When tracd is served through location /
everything is OK.

Another problem is with static content: when using location /trac
theres no css/images Again, with location / its OK.

I’ve tried various configs and searched google, but I just don’t
understand what should be done here. If someone could explain this, or
point a place to learn?

Best regards

Tomek P.

I am late to the party, but …

trac proxying works for me with a construction like this

    location /trac/ {
         proxy_pass  http://iwww:9999/trac/;
         proxy_redirect http://iwww:9999/trac/ /trac/ ;

I have some trouble with the first loading of a trac site (it doesn’t
show css
and the like, but later calls to the adress work fine and I consider
this nearly
a success.

At the moment the trac site sits behind apache but i plan to remove this



This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs