Which one is better?

nginx + php-fpm have worked nicely for the sites I’ve set up.

YMMV.

Glen L. wrote:

I still wonder which one is better for performance

Pure nginx + php-fpm

Or

Nginx + apache2 + proxy_cache

Anybody knows about this?

nginx + php-fpm + xCache… so far I’m loving it.

i think knowing that is in that conf may be relevant.

On Apr 21, 2009, at 6:59 PM, Michael S. wrote:

you forgot to include what your php.conf or whatever it was says

michael-

the problem is that PHP isn’t invoked with this regex location

as per the original posting, the script pipes to php if we have

location /careers

but if we have
location ~ /careers

its served without php

// Jonathan V.

e. [email protected]
w. FindMeOn®.com : connect your online profiles
blog. http://destructuring.net

| - - - - - - - - - -
| Founder/CEO - FindMeOn, Inc.
| FindMeOn.com - The cure for Multiple Web Personality Disorder
| - - - - - - - - - -
| CTO - ArtWeLove, LLC
| ArtWeLove.com - Explore Art On Your Own Terms
| - - - - - - - - - -
| Founder - SyndiClick
| RoadSound.com - Tools for Bands, Stuff for Fans
| - - - - - - - - - -

On Apr 22, 2009, at 2:42 AM, Igor S. wrote:

location ~ “^/(rsvp|pages|careers)/” ?

in it’s entirety:

 location ~ ^/(rsvp|pages|careers)/ {
     if ( -f /home/artwelove/_current/web/www.artwelove.com-

downtime/-news ) {
return 503;
}
root /home/artwelove/_current/web/www.artwelove.com-news/news;
include /usr/local/nginx/_macros/php.conf;
index index.php index.html;
}

the if block was a trick i learned off this list to handle downtime
with semaphores

this block works perfectly as an exact match… and these locations
are just shotcuts to remove a few nested dirs off of a /news main
location. reaching this through /news/careers works as intended ;
rewriting this block to be location /careers works as intended.

On Apr 22, 2009, at 2:42 AM, Igor S. wrote:

location ~ “^/(rsvp|pages|careers)/” ?

in it’s entirety:

location ~ ^/(rsvp|pages|careers)/ {
    if ( -f /home/artwelove/_current/web/www.artwelove.com-

downtime/-news ) {
return 503;
}
root /home/artwelove/_current/web/www.artwelove.com-news/news;
include /usr/local/nginx/_macros/php.conf;
index index.php index.html;
}

the if block was a trick i learned off this list to handle downtime
with semaphores

this block works perfectly as an exact match… and these locations
are just shotcuts to remove a few nested dirs off of a /news main
location. reaching this through /news/careers works as intended ;
rewriting this block to be location /careers works as intended.

( resent as my mac crashed during sending, and this didn’t seem to hit
the list or sent-box. apologies if this is a duplicate )

I figured out the problem, and a temporary solution

looking through my mailbox i saw this thread:

From: [email protected]
Subject: php and locations with regex (round 2)
Date: October 23, 2007 6:44:21 AM EDT

which was the same issue as me.

the problem is that my macro for php is the very standard block

location ~ *.php {}

which should not have been used within a static or regex location -
only in a server
but there is a behavior where it does work on static location

so i created a temporary fix: i made another macro which was just the
contents of the php block

in the 2007 thread, igor said that it would be bad to use an if ()
match on files… is this still true?

ideally i would like to do this:

location ~ /regex/ {
if ( filename *~ .php(?.)? ) {
fcgi passover
}
handle static stuff here
}

On Tue, Apr 21, 2009 at 06:38:13PM -0400, Jonathan V. wrote:

i get the text below ; it makes no sense to me while PHP gets ignored
from this.

2009/04/21 22:31:55 [debug] 20025#0: *48 using configuration “^/(rsvp|
pages|careers)/”

nginx matches

 location ~ "^/(rsvp|pages|careers)/" {

2009/04/21 22:31:55 [debug] 20025#0: *48 http script value: “/home/
artwelove/_current/web/www.artwelove.com-downtime/-news”
2009/04/21 22:31:55 [debug] 20025#0: *48 http script file op
0000000000000000 “/home/artwelove/_current/web/www.artwelove.com-
downtime/-news”

 here is testing existence of file
     /home/artwelove/_current/web/www.artwelove.com-downtime/-news"

2009/04/21 22:31:55 [debug] 20025#0: *48 add cleanup: 00000000006A7DA8
2009/04/21 22:31:55 [debug] 20025#0: *48 http script file op false
2009/04/21 22:31:55 [debug] 20025#0: *48 http script if
2009/04/21 22:31:55 [debug] 20025#0: *48 http script if: false
2009/04/21 22:31:55 [debug] 20025#0: *48 post rewrite phase: 4

 it does not exists, so the static file is handled:

2009/04/21 22:31:55 [debug] 20025#0: *48 http filename: “/home/
artwelove/_current/web/www.artwelove.com-news/news/careers/intern-
technology-developer/index.php”

Could you show

location ~ “^/(rsvp|pages|careers)/” ?