Need help configuring a rails app (redmine)

Maxime Pm lists at
Sat Feb 21 02:00:46 MSK 2009


I'm trying to configure nginx to be able to use redmine at and I can't figure out how to do it. After
trying things for a few hours, I put my config over at port 81 and it's
working correctly. Heres what I have :

upstream mongrel {

server {
                listen       81;
                server_tokens   off;

                root /path/to/root/redmine/public;

                location / {
                        proxy_set_header  X-Real-IP  $remote_addr;
                        proxy_set_header  X-Forwarded-For
                        proxy_set_header  Host $http_host;
                        proxy_redirect false;
                        proxy_read_timeout 300;

                        if (-f $request_filename/index.html) {
                                rewrite (.*) $1/index.html break;

                        if (-f $request_filename.html) {
                                rewrite (.*) $1.html break;

                        if (-f $request_filename.txt) {
                                rewrite (.*) $1.txt break;

                        proxy_pass http://mongrel/;

The problem is that my boss can't access port 81 :/.
So, I copied this config into a "location ^~ /redmine/ {" directive into
my server directive using the port 80. The problem is that images/css
and links points to instead of Tried
everything, but can't figure out what I have to change.

Any idea ?
Posted via

More information about the nginx mailing list