RE: How does this configuration work?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Usually /var/run and /run are symlinks one of the other

so that makes /var/rum/php7.0-fpm.sock and /run/php7.0-fpm.sock the same unix domain socket

 

From: Jason Brooks [mailto:jason.brooks@xxxxxxxx]
Sent: Thursday, November 3, 2016 9:07 PM
To: users@xxxxxxxxxxxxxxxx
Subject: How does this configuration work?

 

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 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

t:

503.290.3105

f:

503.228.4249

fb:

fb.com/eROI

 



 


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux