Skip to content

Some PHP-FPM config seems to be missing in apache2 vhost template

I would have prefer to make a pull request but it seems I am not allowed to fork the projet.

Summary

On Debian 11, PHP requests are not passed to PHP-FPM when DocumentRoot starts with /var/www/foo.com/web instead of /var/www/clients/client1/web1/web

Steps to reproduce

  • Check that mod-fastcgi is not enabled in apache2
  • Set the site in PHP-FPM
  • In Apache Directives, add DocumentRoot {DOCROOT}
  • PHP files will be returned as text
  • Set the site in Fast-CGI, it will work again
  • Set the site in PHP-FPM, it will not work again…

Environment

Server OS + version: Debian 11, Apache2.4 ISPConfig version: 3.2.8p1 Software version of the related software: Apache/2.4.53 (Debian) Package libapache2-mod-fastcgi is not installed, mod-fastcgi is not enabled

Proposed fix

In server/conf/vhost.conf.master, I believe the blocks in lines 411 and 421 should be deduplicated to add <Directory {tmpl_var name='web_document_root_www'}>. This double block seems to be present everywhere (lines 377-384 for example), but not in FPM use_tcp and use_socket configs.

Thank you.