httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Brooks <>
Subject [users@httpd] How does this configuration work?
Date Thu, 03 Nov 2016 19:06:40 GMT

So, the need to make sense of this is not an issue: I will be using the mod_proxy_fcgi to
use php-fpm.  I am just curious.

While trying various configurations to get php-fpm to work, I found the following conundrum:
the following configuration should NOT work but it does...

Here is the apache configuration snippet derived from this site <>
dated last August.
	<Directory /usr/lib/cgi-bin> 
		Require all granted 
	 <IfModule mod_fastcgi.c> 
		AddHandler 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/php7.0-fpm.sock
-pass-header Authorization

Here is the php-fpm www pool socket definition as configured out-of-the-box:
	listen = /run/php/php7.0-fpm.sock

My test php script calls phpinfo() only.  It works.  It’s not clear how it works.  
	Apache opens /var/run/php/php7.0-fpm.sock
	php-fpm opens /run/php/php7.0-fpm.sock
	removal of either file causes php not to work.
	When I point apache to the socket file php-fpm opens, it does not work.

HOW?  How does apache manage to connect to php-fpm when the defined socket paths do not make
sense?  As far as I know, the unix socket file is simply opened and read/written to: there’s
no way to tell linux “connect both files to each other” from within a program...

Thanks for your time!

Jason Brooks	Systems Administrator
eROI	Performance is Art.
m:	505 nw couch #300	w: <>
t:	503.290.3105	f:	503.228.4249

fb: <>

View raw message