Reverse Proxy with Trac
Mario Gazzo
mario.gazzo at gmail.com
Thu Oct 23 16:39:52 MSD 2008
Hi,
I have some trouble getting NGINX to work as a reverse proxy for one
or more Trac servers running in a separate virtual machine. I am new
to NGINX and I have been following the examples to get something
really basic up and running with one Trac instance. I am using the
Trac daemon tracd, which I have had up and running for some time now.
This is my nginx.conf
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
include proxy.conf;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name dev.mytestdom.dk;
location /trac {
proxy_pass http://192.168.0.187:8000/;
proxy_redirect default;
}
}
}
The file "proxy.conf" is taken from http://wiki.codemongers.com/NginxFullExample
and the mime.types comes with the distribution.
The problem is that it works with location "/" but not if I bind it to
"/trac" since the relative links in Trac are not translated correctly
i.e. I get links like "http://dev.mytestdom.dk/mypage" instead of "http://dev.mytestdom.dk/trac/mypage
".
I tried both versions 0.7.19 and 0.6.32.
Any help is appreciated and I am really interested in using nginx as
reverse proxy for our many different servers.
Cheers
Mario
More information about the nginx
mailing list