Relative links in trac

Oinopion oinopion at gmail.com
Fri Nov 2 03:31:45 MSK 2007


   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 Paczkowski

-- 
You will pay for your sins.  If you have already paid, please disregard
this message.





More information about the nginx mailing list