Apache httpd : PHP + PHP-FPM2015/07/30 |
Install PHP-FPM to make PHP scripts be fast.
|
|
[1] | |
[2] | Install PHP-FPM. |
[root@www ~]# yum -y install php-fpm
|
[3] | Configure Apache httpd. |
[root@www ~]#
vi /etc/httpd/conf.d/php.conf # line 5: change like follows <FilesMatch \.php$> # SetHandler application/x-httpd-php
SetHandler "proxy:fcgi://127.0.0.1:9000" </FilesMatch> systemctl start php-fpm [root@www ~]# systemctl enable php-fpm [root@www ~]# systemctl restart httpd |
[4] | create phpinfo and access to it, then it's OK if "FPM/FastCGI" is displayed. |
[root@www ~]# echo '<?php phpinfo(); ?>' > /var/www/html/info.php |
Sponsored Link |