Relative links in trac

Hello!

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 hauru.eu,
the project site (virtual host) skrypt.hauru.eu:8080 and I’d like to
have trac on skrypt.hauru.eu:8080/trac/.

My virtual host looks like that:

server {
listen 8080;
server_name skrypt.hauru.eu;

    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/ {
            proxy_pass      http://127.0.0.1:3050;
    }

}

So here I have problem with trac/proxy: all links within trac are
relative to virtual host (skrypt.hauru.eu:8080), but that should be
relative to trac directory (skrypt.hauru.eu:8080/trac/). So link to
login points to skrypt.hauru.eu:8080/login instead of
skrypt.hauru.eu:8080/trac/login. 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
layer

HTH

Norbert