2 messages in ru.sysoev.nginxRe: setting up nginx with mongrel_clu...
FromSent OnAttachments
Lena HerrmannMar 24, 2008 5:25 am 
Cliff WellsMar 24, 2008 2:01 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: setting up nginx with mongrel_cluster: 403 ForbiddenActions...
From:Cliff Wells (clif@public.gmane.org)
Date:Mar 24, 2008 2:01:00 pm
List:ru.sysoev.nginx

On Mon, 2008-03-24 at 13:25 +0100, Lena Herrmann wrote:

If someone could point me in a direction of what I might have missed, this would be great!

location / { index index.html index.htm; # Forward the user's IP address to Rails proxy_set_header X-Real-IP $remote_addr; # needed for HTTPS proxy_set_header X_FORWARDED_PROTO https; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect false; proxy_max_temp_file_size 0; location ~ ^/(images|javascripts|stylesheets)/ { expires 10y; } if (-f $request_filename) { break; } if (-f $request_filename/index.html) { rewrite (.*) $1/index.html break; } if (-f $request_filename.html) { rewrite (.*) $1.html break; } # uncommented cause the "!" causes an error # if (! -f $request_filename) { # proxy_pass http://myapp; # break; # } } error_page 500 502 503 504 /500.html; location = /500.html { root /var/www/apps/myapp/current/public; } }

Where is your proxy_pass directive? It looks like you had one and then commented it out.

As an aside, I suggest you put your proxy directives into a separate file and then include it (that is, everything *except* the proxy_pass directive). If your config was a little less cluttered, you'd certainly have caught this omission yourself.

Cliff