httpd-users mailing list archives

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

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 <https://www.howtoforge.com/tutorial/apache-with-php-fpm-on-ubuntu-16-04/>
dated last August.
	<Directory /usr/lib/cgi-bin> 
		Require all granted 
	 </Directory> 
	 <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
	</IfModule>

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:	eroi.com <http://eroi.com/>
t:	503.290.3105	f:	503.228.4249


fb:	fb.com/eROI <http://www.facebook.com/eROI>









Mime
View raw message