Quantcast
Channel: Nginx Forum - Php-fpm Mailing List - English
Viewing all articles
Browse latest Browse all 219

php-fpm 5.4.6 + httpd 2.4 + mod_fastcgi + unix socket + chroot = impossible? (1 reply)

$
0
0
I've been struggling for days to get the following setup working:

- PHP-FPM (from PHP 5.4.6 core) running with chrooted workers.
- httpd 2.4.3 running in a chroot (virtual host docroots are visible to
Apache).
- mod_fastcgi 2.4.6 acting as a bridge between PHP-FPM and httpd, using
FastCgiExternalServer and communicating over a UNIX socket.

My conclusion after many hours of Googling, experimenting and debugging is
that what I want is simply not possible, without some modifications to
PHP-FPM. The problem lies in the fact that Apache will pass on a
DOCUMENT_ROOT to PHP-FPM that is not visible to the PHP-FPM worker process,
when it's chrooted to the virtual host's DocumentRoot. All attempts at
modifying the DOCUMENT_ROOT environment variable prior to passing it on to
the PHP-FPM worker have failed. I've seen one patch where a new
configuration directive was added, that effectively seemed to strip the
chroot path prefix from the document root. However, I'd rather not modify
production code, without seeing some sort of approval from the PHP team.

I'm wondering whether this is currently being worked on and if I should
await any core patches that will enable me to safely run this setup in a
production environment. Any other insights into making this work
(elegantly) are also more than welcome!

Best regards,
Ro Achterberg

Viewing all articles
Browse latest Browse all 219

Latest Images

Trending Articles



Latest Images