Re: Getting PHP-FPM working

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

 



Hi Christian:

Result:  "No Input File Specified"

First, thanks for spending the time to explain this to me.  To some extent 
you are saying what I had already thought but I figured I must be missing 
something!

The details:

Your second example seems to match exactly what I want to do so I cut and 
pasted from your memo to be sure of no typing errors.

 ProxyPassMatch "^/.*\.php(/.*)?$" fcgi://127.0.0.1:9015/httpd/iliffe/

I note that there is no '/$1' ending on your directive, which differs from 
the wiki example.  

So, I ran strace and here is what was actually requested (about 24000 lines 
skipped here):

---------------------------
lstat("/httpd/iliffe//i_phpinfo.php", {st_mode=S_IFREG|0644, st_size=213, 
...}) = 0
29999 10:06:25 lstat("/httpd/iliffe", {st_mode=S_IFDIR|0755, st_size=4096, 
...}) = 0
29999 10:06:25 lstat("/httpd", {st_mode=S_IFDIR|0755, st_size=141, ...}) = 
0
29999 10:06:25 lstat("/httpd/iliffe/.user.ini", 0x7ffffb866e90) = -1 ENOENT 
(No such file or directory)
----------------------------

Notice that the initial lstat is correct, (ignoring the double '/', but 
this doesn't seem to cause a problem) and the response is 0, indicating 
that it got the file OK.  

So, why does it continue to stat the subdirectory and the root directory?  
And what is the .user.ini that it needs?

Just to be complete, here is the PHP log entry:

[18-May-2017 10:06:25] WARNING: [pool www] child 29999 said into stderr: 
"ERROR: Unable to open primary script: /httpd/iliffe//i_phpinfo.php (No such 
file or directory)"

and the httpd log entry:

[Thu May 18 10:06:25.958856 2017] [proxy_fcgi:error] [pid 29694:tid 
140326128224000] [client 206.248.138.118:49284] AH01071: Got error 'Unable 
to open primary script: /httpd/iliffe//i_phpinfo.php (No such file or 
directory)\n

and, just to show it does exist:

namei /httpd/iliffe/i_phpinfo.php
f: /httpd/iliffe/i_phpinfo.php
 d /
 d httpd
 d iliffe
 - i_phpinfo.php

this last done from user phpfpm which is the user/group that php-fpm is 
running under.

Seems that there is something I don't have but I have revisited the 
documentation a number of times, especially the wiki, and there is nothing 
that suggests I need any .ini files.

Regards,

John  
=========================================
On Thursday 18 May 2017 04:36:19 Christian Hettler wrote:
> Hello John,
> 
> http://httpd.apache.org/docs/2.4/mod/mod_proxy_fcgi.html
> 
> If you want to serve http://your.virtual.srv/info to fpm-php
> you have to configure
> 
> ProxyPassMatch ^/info$ fcgi://127.0.0.1:9015/httpd/iliffe/
> 
> and put the file "info" into the directory "/httpd/iliffe/".
> 
> Another example:
> To serve
>         http://your.virtual.srv/myapp/info.php
> configure
>         ProxyPassMatch "^/myapp/.*\.php(/.*)?$"
> fcgi://127.0.0.1:9015/httpd/iliffe/ and put info.php into
>         /httpd/iliffe/myapp/
> 
> One more example:
> 
> If you have
>         /httpd/iliffe/i_phpinfo.php
> an the config is
>         ProxyPassMatch "^/.*\.php(/.*)?$"
> fcgi://127.0.0.1:9015/httpd/iliffe/ you can request
>         http://your.virtual.srv/i_phpinfo.php
> 
> The match of the url must be equal to the filesystem beyond
> DocumentRoot. DocumentRoot must be specified in "fcgi://127.0.0.1:..."
> 
> If you want to serve http://your.virtual.srv/info from
> /httpd/iliffe/i_phpinfo.php you have to rewrite "info" first (not
> tested):
> 
>         RewriteRule ^/info$ /i_phpinfo.php [P]
>         ProxyPassMatch "^/.*\.php(/.*)?$"
> fcgi://127.0.0.1:9015/httpd/iliffe/
> 
> Hope this helps.
> 
> regards,
> 
> Christian
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[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