Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 587896 - Apache documentation regarding php-fpm misleading
Summary: Apache documentation regarding php-fpm misleading
Status: RESOLVED INVALID
Alias: None
Product: Documentation
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-03 17:08 UTC by jhon
Modified: 2016-07-16 15:31 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jhon 2016-07-03 17:08:41 UTC
The documentation instruct changing the following directives in manner which results in server missconfiguration:
listen.owner = nobody
listen.group = nobody
 the apropriate value should be:
listen.owner = apache
listen.group = apache 
(For Nginx use nginx)

I've tested on both local and remote servers, the nobody configuration doesn't seem to work.
Also, I'm not the only one, see here:
http://stackoverflow.com/questions/23443398/nginx-error-connect-to-php5-fpm-sock-failed-13-permission-denied


Reproducible: Always

Steps to Reproduce:
1.load a php web page
2.
3.
Actual Results:  
getting an error: [proxy:error] [pid 13096:tid 140629329839872] (13)Permission denied: AH02454: FCGI: attempt to connect to Unix domain socket /var/run/php-fpm/www.sock (*) failed

Expected Results:  
should load (obviously)
Comment 1 Michael Palimaka (kensington) gentoo-dev 2016-07-13 16:20:12 UTC
Which documentation are you referring to?
Comment 2 jhon 2016-07-13 17:30:24 UTC
(In reply to Michael Palimaka (kensington) from comment #1)
> Which documentation are you referring to?

I'm referring to: 
https://wiki.gentoo.org/wiki/Apache#Enabling_PHP-FPM_through_mod_proxy_fcgi_in_Apache_2.4

As I mentioned, I get "Permission denied" error when php-fpm.conf is configured to nobody.

I get the same with nginx as well:
[crit] 28772#28772: *5 connect() to unix:/run/php-fpm.socket failed (13: Permission denied) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm.socket:", host: "localhost"

srw-rw----  1 nobody nobody     0 Jul 13 20:03 php-fpm.socket

It seems like, when it's configured to nobody - nginx and apache can't use it
Comment 3 Mike Gilbert gentoo-dev 2016-07-16 15:31:49 UTC
It's a wiki; feel free to edit it.