httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Iliffe <>
Subject Re: [users@httpd] Getting PHP-FPM working
Date Thu, 18 May 2017 14:44:41 GMT
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 

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

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, ...}) = 
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] AH01071: Got error 'Unable 
to open primary script: /httpd/iliffe//i_phpinfo.php (No such file or 

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.


On Thursday 18 May 2017 04:36:19 Christian Hettler wrote:
> Hello John,
> If you want to serve http://your.virtual.srv/info to fpm-php
> you have to configure
> ProxyPassMatch ^/info$ fcgi://
> 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:// 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:// 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://"
> 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://
> Hope this helps.
> regards,
> Christian

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message