Results 1 to 4 of 4
-
07-26-2010, 11:40 PM #1Disabled
- Join Date
- Jul 2010
- Posts
- 25
nginx and php installation on Debian tutorial
http://blog.benweblife.fr/index.php/...ebian/?lang=en
(This tutorial is not written by me and I'm not providing support on it. I'm sharing it with WHBT)
Hello !
You'll find here a tutorial on howto install Php with Nginx on Debian, in a few lines!
Installation
Debian packages was made by me :
Warning, packages are only for the testing or squeeze version of Debian and for 64bit, the 32bit packages will be available on Saturday.
cd /usr/src/
wget http://labs.benweblife.fr/debian/tes....2-1_amd64.deb
dpkg -i php5-fpm_5.3.2-1_amd64.deb
If an error message appear concerning the depending of php5-common package, two possibility:
apt-get/aptitude install php5-common
or
wget http://labs.benweblife.fr/debian/tes....2-1_amd64.deb
dpkg -i php5-common_5.3.2-1_amd64.deb
So, easy, doesn't it?
Configuration
Configurations files are in this directory: /etc/php5/fpm/
One of them is php5-fpm.conf:
; Choose how the process manager will control the number of child processes: dynamic create process "on-demand" or static create all process in one time
pm = dynamic
; the maximum number of child processes to be created, Equivalent to the Apache MaxClients directive.
pm.max_children = 50
; The number of child processes created on startup. ideally : min_spare_servers + (max_spare_servers - min_spare_servers) / 2
pm.start_servers = 8
; minimum number of idle server processes
pm.min_spare_servers = 5
; maximum number of idle server processes
pm.max_spare_servers = 35
; number of requests each child process should execute before respawning. (0 = endless)
pm.max_requests = 0
That's all for FPM, now its Nginx part :
Copy these lines in your configuration site file
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SERVER_NAME $http_host;
fastcgi_ignore_client_abort on;
}
And that is, its ready!
Don't forget to restart all services, and to create a "phpinfo()" file :
/etc/init.d/nginx reload
/etc/init.d/php5-fpm restart
echo "<?php phpinfo() ?>" > /var/www/phpinfo.php
Others
I recommend installation of this module :
apt-get/aptitude install php5-suhosin php5-mysql php-pear php5-dev
pecl install htscanner-alpha
echo "extension=htscanner.so" > /etc/php5/conf.d/htscanner.ini
The htscanner extension scan .htaccess file for the php directive.
Don't install the APC (Alternative Php Cache), it will crash php.
Enjoy ! It rocks !
-
07-27-2010, 12:48 AM #2Aspiring Evangelist
- Join Date
- Mar 2010
- Location
- /global/asia/vn
- Posts
- 435
Can you write full tutorial to install: Nginx + Php fpm + mysql + xcache?
If yes, please write carefully step by step. Thanks!
-
07-27-2010, 02:10 PM #3Newbie
- Join Date
- Jul 2010
- Posts
- 16
Great. make it a full fledged one.
-
07-27-2010, 03:05 PM #4Web Hosting Master
- Join Date
- Jun 2010
- Posts
- 592
Nginx + Php + mysql + eAccelerator:
http://www.rockia.com/2010/05/how-to...untu-or-centos
Similar Threads
-
PHP Caching : APC Installation and Configuration Tutorial
By agnivo007 in forum VPS TutorialsReplies: 12Last Post: 04-18-2011, 07:40 AM -
nginx installation
By alienmare in forum Systems Management RequestsReplies: 5Last Post: 07-15-2009, 05:45 PM -
Debian linux Web Hosting Setup Tutorial Help.
By SaintSamuel in forum Hosting Security and TechnologyReplies: 0Last Post: 10-15-2005, 04:21 PM -
nameserver tutorial and/or installation
By webephex in forum Employment / Job OffersReplies: 2Last Post: 03-10-2004, 11:24 PM -
Debian Server-Setup Tutorial
By hausmasta in forum Hosting Security and TechnologyReplies: 3Last Post: 12-01-2003, 07:13 PM