Welcome! Log In Create A New Profile

Advanced

Re: proxy_pass to Apache config not working like fastcgi_pass

December 06, 2009 12:46AM
On Sat, Dec 5, 2009 at 9:28 PM, nerdgrind <nginx-forum@nginx.us> wrote:

> I run Red Hat Enterprise Linux 5 server. If I were to install PHP-FPM, which patches the PHP package, it would be replaced when PHP is updated on the next yum update. I have spawn-cgi installed, and can run it only from the command line as such:

well you don't run php from an rpm package and php-fpm on top of it.
you pick one or the other :p

if you are really glued to using php from a repository than spawn-fcgi
is your better choice for now

> /usr/local/bin/spawn-fcgi -a 127.0.0.1 -p 9001 -C 5 -u apache -g apache -f "/usr/bin/php-cgi /maxconns=1024 /maxreqs=1024" -P /var/run/fastcgi-php.pid

if you're having issues with spawn-fcgi (which i can't tell if you are
or not) i would check if this is legit "/usr/bin/php-cgi
/maxconns=1024 /maxreqs=1024" - i was not aware that php-cgi took
command line arguments like a windows command (but maybe the behavior
has changed and i just don't pay attention because i don't need to)


> Apache can run PHP reliably on heavy loads, and it gets updated automatically on a yum update, so for me it works, and it automatically restarts if the sever does, because the init script works.

Apache can easily choke on heavy loads. Been there, done that. As have
many people here. I'd cite benchmarking but it seems like everyone's
got a page of benchmarks out there and Apache chokes, Lighty chokes
sometimes, nginx never chokes.

> I've read that under heavy load Apache can handle PHP much more reliably than fastcgi as well, which is what I'm after.

Where?

> Apache running as a backend in the configuration I cited above uses as much or less memory and CPU cycles as fastcgi, so the only issues for me are reliability, and the ability to have an init script that works.

Where?

> I am also concerned about SEO: http://wordpress.org/extend/plugins/nginx-compatibility/

I run wordpress with full SEO (I assume "friendly URLs") as do tons of
people on this list with a single line of nginx configuration code. I
have been for years now (well, the new single line option happened
somewhere along the way, before that it was 3 lines)

See: http://michaelshadle.com/2009/03/19/finally-using-nginxs-try-files-directive/

> My config handles different files in different ways as you can see. I have several high traffic blogs, and they have very specific needs.

You can probably simplify things a lot. Use includes for redundant
portions. I have one for expires headers for graphics/assets. etc.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

proxy_pass to Apache config not working like fastcgi_pass

nerdgrind December 05, 2009 11:46PM

Re: proxy_pass to Apache config not working like fastcgi_pass

mike December 05, 2009 11:58PM

Re: proxy_pass to Apache config not working like fastcgi_pass

nerdgrind December 06, 2009 12:28AM

Re: proxy_pass to Apache config not working like fastcgi_pass

mike December 06, 2009 12:46AM

Re: proxy_pass to Apache config not working like fastcgi_pass

nerdgrind December 06, 2009 01:25AM

Re: proxy_pass to Apache config not working like fastcgi_pass

nerdgrind December 06, 2009 01:35AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 110
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready