?????????
?????????????PHP?汾5.4??????????????Laravel??PHP?汾?????5.6?????????????????????PHP5.6.*??????????????汾??PHP?????????nginx??????????ò???汾??
???????????
????Nginx?????PHP-FastCGI??PHP?????????PHP-FastCGI???к?????????????????????????м???????Nginx???????????FastCGI????????????????Nginx?????PHP??????
???????PHP-FastCGI?????????????????????ò???汾??PHP-FastCGI?????У??????????????????Nginx?и?????????????ò????PHP-FastCGI???????????????????汾PHP???????
??????????????
????????????????????????????
????1.php-fpm?????????????9000????????9001
????2.Nginx????????????9000??9001??
???????????PHP??????????php-fpm???????·??????? /PHP_INSTALLED_PATH/etc/php-fpm.conf ??php???????????????????php-fpm.default.conf?????????php-fpm.conf????)????????·?????????????????????·???????????ɡ?
???????????T?????ü?????????????????9000???9001?????????òο???汾php-fpm.conf?????ü??ɡ?
????listen = 127.0.0.1:9000
????#fpm??????????nginx??php???????????????????ɡ????????: 'ip:port'?? 'port'?? '/path/to/unix/socket'. ????????????????.
????????????????5.2??????汾?????php-fpm??????????fpm??????????????? gzip -cd php-5.2.14-fpm-0.5.14.diff.gz | patch -d php-5.2.14 -p1
??????????????Nginx vhost.conf???????????????2????
1 server {
2     listen       80;
3     server_name  a.b.com;
4     index index.html index.htm index.php;
5     root /MY_PROJECT_PATH;
6
7     location / {
8            try_files $uri $uri/ /index.php?$query_string;
9     }
10     location ~ .*.(php|php5)?$         {
11         #fastcgi_pass  unix:/tmp/php-cgi.sock;
12         fastcgi_pass  127.0.0.1:9001;
13         fastcgi_index index.php;
14         include fastcgi.conf;
15     }
16 }
????????9001????????????.php??.php5????????????9001????
????????????????°?php-fpm??????nginx??
????php-fpm?????????
????start?????PHP??FastCGI?????
????stop????????PHP??FastCGI?????
????quit????????PHP??FastCGI?????
????restart?? ????PHP??FastCGI?????
????reload?? ???????PHP??php.ini??
????logrotate?? ????????log?????
????????????1??php-fpm start????????????????????????502BAD GATEWAY????netstat -ano???????м?????9001????????????php-fpm????????
??????????????????????????????????php-fpm?????????£?
????#????php-fpm????
????/usr/local/php/sbin/php-fpm -t
????/usr/local/php/sbin/php-fpm -c /usr/local/php/etc/php.ini -y /usr/local/php/etc/php-fpm.conf -t
????#???php-fpm
????/usr/local/php/sbin/php-fpm
????/usr/local/php/sbin/php-fpm -c /usr/local/php/etc/php.ini -y /usr/local/php/etc/php-fpm.conf
????????????????????????????????9001???
????????????2??
????ERROR: [pool www] cannot get uid for user '@php_fpm@
????ERROR: FPM initialization failed
??????????????php-fpm.conf??user??group???????????????????root??www??????????root?????????????
??????????????????????Linux???汾PHP???棬????????????????????????????????汾??PHP??