atom feed11 messages in ru.sysoev.nginxRe: need help calling PHP as a fallback
FromSent OnAttachments
davvvJan 4, 2010 8:46 pm 
Claude BingJan 4, 2010 9:18 pm 
davvvJan 4, 2010 9:36 pm 
Claude BingJan 4, 2010 9:40 pm 
davvvJan 4, 2010 9:46 pm 
Piotr SikoraJan 4, 2010 9:58 pm 
davvvJan 4, 2010 10:25 pm 
Rob SchultzJan 4, 2010 10:31 pm 
Piotr SikoraJan 4, 2010 11:40 pm 
davvvJan 5, 2010 12:14 am 
Edho P AriefJan 5, 2010 1:23 am 
Subject:Re: need help calling PHP as a fallback
From:Edho P Arief (edho@gmail.com)
Date:Jan 5, 2010 1:23:14 am
List:ru.sysoev.nginx

On Tue, Jan 5, 2010 at 3:15 PM, davvv <ngin@nginx.us> wrote:

Oops, sorry about that; I thought you meant to simply add "debug" to the log
directive in the .conf.

But! I updated to 0.8.31 and rebuilt with --with-debug (as per your
recommendation) and everything works perfectly.

Here's my final nginx.conf if anyone else will want to do something similar in
the future.

       location /eve/ {            proxy_pass http://127.0.0.1:9001;            proxy_intercept_errors on;            error_page 504 = @fallback;        }

       location @fallback {              rewrite  ^(.*)$  /backend.php;        }

Kind of a messy rewrite, but for my purposes, it's fine. Thanks for all the
help, and happy 2010 =)

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,36944,36998#msg-36998

I believe you can just do this

location /eve/ { proxy_pass http://127.0.0.1:9001; proxy_intercept_errors on; error_page 504 = /backend.php; }