Tag Archives: nginx

Recommended Nginx

How to Install PHP-FPM for Nginx!

Recently, I’ve switched some of my web servers that handle large file downloads from spawn-cgi to PHP-FPM.  The result is that I can handle more large files with more PHP-CGI processes while my site still loads well even if there’s many concurrent downloads going on.

I am still experimenting with PHP-FPM but it seems like a pretty good way to go as far as handling the PHP-CGI processes.

To do this, you will need to install EPEL & CentALT repositories:

rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-3.noarch.rpm

rpm -Uv

Click Here to Read Full Article

Leave a comment

How to Optimize Large File Downloads on Nginx!

For those of you who have large file downloads on your web server, your web server might have trouble loading the faster parts of your website while users hog your bandwidth.

I’ve been researching many ways to optimize large file downloads but probably the best way is to simply rate limit the bandwidth on how fast each user can download.

You can add the following line to your HTTP directive in /etc/nginx/nginx.conf:

limit_rate 100k

This will limit each user to download at maximum of 100kb/second.

You can change this number to see which one fits best

Click Here to Read Full Article

Leave a comment

How to Fix One PHP-CGI Running!

The other day I had a problem with one of my newest servers, upon which I had installed new version of Nginx and Spawn-fcgi.

Well, my Nginx kept crashing, actually my PHP-cgi processes started crashing after the server ran for a bit. The weird thing was, the server had no load.

Upon carefully watching my “top” status in linux for awhile, I realized there’s only one PHP-CGI process running, whereas all my other Nginx web servers ran multiple (around 5-6 at any given time).

I compared out the versions of the Spawn-cgi and realized the new Spawn-cgi I ha

Click Here to Read Full Article

69 Comments