Hi All,
Request your help on hot to configure PHP-FPM in Apache, was able to configure FastCGI and the info.php pages states “Server API CGI/FastCGI” , but not able to configure PHP-FPM below are my configurations and the info.php page does not state “Server API FPM/FastCGI”
systemctl status php-fpm is showing that FMP is running without any issues.
Apache Version : 2.4.38 (Linux/SUSE)
PHP Version : 7.2.5
Virtual Host Configuration
<VirtualHost devstack.com:80>
ServerAdmin admin@devstack.com
ServerName devstack.com
DocumentRoot /devstack/web/public
ErrorLog /var/log/apache2/devstack/devstack-error_log
CustomLog /var/log/apache2/devstack/devstack-access_log combined
<Directory “/Playbooks/Automation/devstack/web/public”>
Options All +ExecCGI
AllowOverride All
Require all granted
AddHandler fcgid-script .php
Action fcgid-script /php-fcgi-scripts/php-fcgi-starter.fcgi
</Directory>
</VirtualHost>
FPM Configuration
pool name = devstack
user = wwwrun
group = www
listen = /var/run/php/devstack.sock
listen.owner = wwwrun
listen.group = www
listen.mode = 0660
pm = dynamic
pm.max_children = 10
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
**httpd.conf
**
AddHandler fcgid-script .fcgi
<FilesMatch “.php$”>
AddHandler fcgid-script .php
Options +ExecCGI
FcgidWrapper /devstack/web/public/php-fcgi-scripts/php-fcgi-starter.fcgi .php
</FilesMatch>
**Configuration Tested:
**
If I add the below lines in the virtualhost.conf file or httpd.conf file the page is getting downloaded why accessing it form the browser
<FilesMatch \.php$>
SetHandler "proxy:unix:/var/run/php/devstack.sock|fcgi://localhost"
</FilesMatch>
No changes if I add the below lines in virtualhost.conf file
<IfModule mod_fastcgi.c>
SetHandler php7-fcgi .php
Action php7-fcgi /php7-fcgi virtual
Alias /php7-fcgi /usr/lib/cgi-bin/php7-fcgi
FastCgiExternalServer /usr/lib/cgi-bin/php7-fcgi -socket /var/run/php/devstack.sock -pass-header Authorization
</IfModule>
From,
Vino.B