tracd multiple projects+nginx reverse proxy
Posted
by
Xeross
on Server Fault
See other posts from Server Fault
or by Xeross
Published on 2010-11-02T22:33:10Z
Indexed on
2012/03/20
11:31 UTC
Read the original article
Hit count: 293
I am trying to setup nginx with a reverse proxy to tracd, however I only want to use 1 tracd.
Now first here's my config for this domain
server {
listen 80;
server_name bugs.XXXXXXXX.com;
access_log /var/log/nginx/XXXXXXXX-bugtracker.access.log proxy;
location / {
rewrite ^/bugtracker/(.*)$ /$1;
rewrite ^/bugtracker$ /;
proxy_pass http://127.0.0.1:81/bugtracker/;
proxy_redirect default;
proxy_set_header Host $host;
}
location ~ /\.ht {
deny all;
}
}
As you can see there's the rewrite rules, because for some reason all the urls that tracd spews out are like /bugtracker/something.
Now this is indeed caused by tracd just sending urls like it normally should however trac is at bugs.XXXXXXXX.com/ and not at bugs.XXXXXXXX.com/bugtracker. So how can I make tracd/trac display the (In this case) correct urls ?
© Server Fault or respective owner