Symlinks breaks FPM on Debian Stretch
short description
Overriding the document root with the {DOCROOT} placeholder in apache directives breaks php-fpm. So:
DocumentRoot {DOCROOT}/folder
in apache directive will results in DocumentRoot /var/www/example.com/web/folder
, and php fpm stops work, and will return a file php as plain text to the browser.
But, if switch to FastCGI, mod_php, etc it works.
The problem is the symlink, because if you put in the apache directives box this, instead using the placeholder:
DocumentRoot /var/www/clients/clientX/webY/web/folder
It works also with FPM.
correct behaviour
With mod_proxy_fcgi seems not support the symlinks, so the {DOCROOT} should be a real path, and FPM will work.
environment
- Server OS: debian
- Server OS version: stretch
- ISPConfig version: 3.1.7
Server version: Apache/2.4.25 (Debian)
Server built: 2017-09-19T18:58:57
PHP 7.0.19-1 (cli) (built: May 11 2017 14:04:47) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.19-1, Copyright (c) 1999-2017, by Zend Technologies
proposed fix
The {DOCROOT} placeholder should put the real path instead the symlink to the web folder.