Nginx small summary (6) nginx small summary (5) http://www.bkjia.com/ OS /201303/193042.html nginx connection php, we use php-fpm, the above installed php, next let's take a look at www.2cto.com [root @ host2 sbin] # lsphp-fpm [root @ host2 sbin] # pwd/usr/local/php/sbinphp-fpm installation location [root @ host2 php-5.3.6] # cp php. ini-production/usr/local/php/etc/php. ini generates the php configuration file www.2cto.com [root @ host2 local] # vim/usr/local/php/etc/php. ini date. timezone = Asis/Chongqing; change the time zone [root @ host2 etc] # Cp php-fpm.conf.default php-fpm.conf php-fpm configuration cd/usr/local/php/etcvi php-fpm.conf.default php-fpm.conf # Remove the following lines of annotation pid = run/php-fpm.pidpm.max_children = 50pm. start_servers = 20 # Make sure to perform a stress test in the production environment to find the most appropriate number of processes combined with pm. min _spare_servers = 5. max_spare_servers = 35pm. max_requests = 500 service php-fpm startchkconfig php-fpm onecho "export PATH =\$ PATH:/usr/local/php/bin" >> ~ /. Bash_profile source ~ /. Bash_profile // Add the environment variable [root @ host2 php] # useradd-M-s/sbin/nologin www // forget to add the user, add [root @ host2 php] # sbin/php-fpm-c/usr/local/php/etc/php here. ini [root @ host2 php] # netstat-antpl | grep: 9000tcp 0 127.0.0.1: 9000 0.0.0.0: * LISTEN 2512/php-fpm.conf) [root @ host2 local] # vim nginx/conf/nginx. conf // modify the nginx configuration location ~ * \. Php $ {fastcgi_pass 127.0.0.1: 9000; fastcgi_index index. php; include fastcgi. conf;} nginx-s reload write a php test page! Test. php [root @ host2 html] # vim/usr/local/nginx/html/test. php <? Php phpinfo ();?> Php is almost the same!