Hi Lucas, Stuart,
I'm in the process of trying to set up nginx, and it looks to me like
your config file results in SwitchPipe/Mongrel receiving the request
for static content (images, javascripts, etc.). At least, that is what
looks to be happening in my testing.
Are you noticing this too, or is it just something happening with my
setup?
I've tried re-working configs I've found around for nginx and mongrel
to exclude static content from being passed through the proxy, however
I've had no luck. The most obvious snippet based upon the mongrel ones
is something like :
if (-f $request_filename) {
# SwitchPipe
proxy_pass
http://127.0.0.1:10000/app_name_here/;
break;
}
However, this throws up errors that:
"proxy_pass" may not have URI part in location given by regular
expression, or inside named location, or inside the "if" statement, or
inside the "limit_except" block in /etc/nginx/nginx.conf:99
I've also tried snippets like the one below in the hope that "break"
will stop the processing and just serve that content, however this
doesn't seem to be how break works.
if (-f $request_filename) {
break;
}
Nginx is serving up static content fine when I comment out the
proxy_pass directive, but I can't seem to work out any way to turn off
the proxy when the file exists in the file system.
I can't say I'm overly familiar with Nginx - do you have any ideas?
Thanks for getting the ball rolling with a Nginx config file though!
Gave me the inspiration to have a play.
On the other side of things, Pete, are there any plans for Switchpipe
to handle passing static content through on it's own, or is that
outside of it's scope? (Just considering other options if there really
isn't a solution to the nginx issue).
Best regards,
Jason Stirk
On Feb 8, 3:11 am, Lucas Efe <
lucas...@gmail.com> wrote:
> I writing only to announce a success on running SwitchPipe throughNginx.
>
> Thanks for this nice gift to the community. We were needing this. It
> was a real pain in tha a** to manage the available ports, plus the
> memory consumption.
>
> Right now it goes great!
>
> This isNGINXserver config file: