How to Installation and Setup: Nginx + php5-fpm on Debian

In this article, you will learn how to put a bunch of Nginx + php5-fpm (php 5.3) on Debian Lenny and configure secure configuration.
Installing and configuring
Important: all commands from the root.
Add the repository and generate keys:



Install nginx php5-fpm:

Here is the configuration file/etc/nginx/nginx.conf to mean:

Sample config
Config for use with CMS WordPress, taking into account the use of chrooted/etc/nginx/sitesenabled/

Install mysql:

Create a directory and a file index.php:

Restart nginx and php5-fpm:


Prostavim the correct law directories:


Fix the vulnerability associated with the

to do this, set the/etc/php5/fpm/php.ini

Enable use of chroot, to restrict access to PHP. To do this, edit the file/etc/php5/fpm/php5-fpm.conf, type:

Next, we will be faced with the problem that PHP cannot possible address, correct:

Restart the php5-fpm:

Go to the page of our website and admire the phpinfo() vovod on our website.
P.s. C settings helped me understand inkvizitor68sl the author of the blog
Installing Nginx 0.8.54


Debian Squeeze”
To install the package php-fpm will need:


UPD: added a couple of rows in mysql installation, specify localhost settings now works.