Nginx Summary (6)

Source: Internet
Author: User

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!
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.