LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   NGINX with PHP-FPM vis NGINX with Spawn-FCGI (https://www.linuxquestions.org/questions/linux-server-73/nginx-with-php-fpm-vis-nginx-with-spawn-fcgi-868173/)

WhisperiN 03-12-2011 01:38 PM

NGINX with PHP-FPM vis NGINX with Spawn-FCGI
 
Hello fellows,
How you doing all?

Recently, I've started to use NGINX in place of (or with) Apache.

First, I started on making few tests on NGINX performance..
My setup was a CentOS VPS + NGINX + Spawn-FCGI.
The benchmarks were amazing compared to Apache.

Now, I've done the migration to NGINX, on one of my Web servers Boxes.

That box setup is: Slackware 13.1 + NGINX + PHP 5.3.5 + PHP-FPM

I wonder now, which is better, for performance in the first place..
Is it the PHP-FPM, or the Spawn-fcgi ??


Also, I need a little help with some NGINX configs..
On my old setup when I was using Apache..

I had configured it to redirect ANY request to ANY file in one particular directory to another location, this is what I had in that directory .htaccess:

Assuming this direcoty located on:
uploads/
Code:

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://xxxxxx.xxx/box1/$1 [R=301,L]

This redirect aims to reduce bandwidth consumption on that box, and redirect the traffic on that directory to a mirror of it on another server.

I couldn't really find or get any setting for NGINX that handle this redirect correctly..

Any Help will be more than appreciated..

- Hasan

WhisperiN 03-15-2011 06:39 PM

Any comments fellows..!!

Regards..


All times are GMT -5. The time now is 03:02 AM.