Forum: NGINX Need help configuring a rails app (redmine)

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Maxime P. (Guest)
on 2009-02-21 01:00

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 ?
This topic is locked and can not be replied to.