setting up nginx with mongrel_cluster: 403 Forbidden
Cliff Wells
cliff at develix.com
Tue Mar 25 00:01:23 MSK 2008
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
More information about the nginx
mailing list