Here is my pool setup for php-fpm:
[example.com] ; OUR CUSTOM SETTINGS listen = 127.0.0.1:9002 prefix = /home/example chroot = $prefix ; DEFAULT DEBIAN SETTINGS chdir = /public_html user = example group = apache listen.owner = example listen.group = apache pm = dynamic pm.max_children = 5 pm.start_servers = 2 pm.min_spare_servers = 1 pm.max_spare_servers = 3 and here is my apache vhost:
<VirtualHost *:80> ServerName example ServerAlias example.com $ ServerAdmin [email protected] DocumentRoot "/home/example/public_html" ErrorLog "/home/example/logs" CustomLog "/home/example/logs1.log" combined ScriptAlias /cgi-bin/ /home/example/cgi-bin/ Alias /phpmyadmin /home/phpmyadmin #FastCgiExternalServer /home/example/public_html -host 127.0.0.1:9000 #AddHandler php-fastcgi .php #Action php-fastcgi /etc/httpd/php/sbin/php-fpm.fcgi #Alias /etc/httpd/php/sbin/php-fpm.fcgi /etc/httpd/php/sbin/php-fpm FastCGIExternalServer /home/example/public_html/php5.fcgi -host 127.0.0.1:9002 <Directory /home/example/public_html> Order allow,deny Allow from all AddType application/x-httpd-fastphp5 .php Action application/x-httpd-fastphp5 /php5.fcgi </Directory> <Directory "/home/example/public_html"> AllowOverride All Order allow,deny Allow from all DirectoryIndex index.php index.html index.htm default.htm </Directory> <Directory "/home/phpmyadmin"> AllowOverride All Order allow,deny Allow from all DirectoryIndex index.php index.html index.htm default.htm Options -Indexes </Directory> </VirtualHost> I get error: File not found. I think problem is php-fpm can't find file....
Anyone can help me with this?
[Wed Nov 18 00:49:29 2015] [error] [client 192.168.1.68] FastCGI: server "/home/example/public_html/php5.fcgi" stderr: Primary script unknownalso when I use default apache config without virtual hosts all works fine and also when I use apache with virtual host and mod_php all works fine...