PHP-FPM does not work when alternative DocumentRoot is set
short description
For some websites we need to set specific Apache Directives like e.g this one:
DocumentRoot "{DOCROOT}/public"
This is needed because some applications have a different entry point. Now when we set this webroot then the PHP-FPM mode doesn't work anymore because the path within the directory directive is not changed.
<Directory /var/www/clients/client75/web343/web>
should become <Directory /var/www/clients/client75/web343/web/public>
correct behaviour
It should be possible to set somewhere the {DOCROOT}
variable and then be used everywhere. Ideally on the options page per domain.
environment
Server OS: Centos Server OS version: 7 ISPConfig version: 3.1.15p3
# apachectl -v
Server version: Apache/2.4.6 (CentOS)
Server built: Apr 2 2020 13:13:23
We have a multi php set-up with php 5.6, 7.0, 7.2 and 7.3. And we tested the issue with all of them even though it is pretty clear that the problem is not with the PHP version.