2

Since monday 15 february 2021 (because I update every monday), an update broke my apache and php settings. I used to have php 8.0 and php 7.4 at the same time for several months.

The default php is 8.0 and some old sites need 7.4. I use this on that old php configs:

<VirtualHost *:443>
    ...
        #Force use php 7.4 because osticket does not support PHP 8.0
        <FilesMatch "\.php$"> # Apache 2.4.10+ can proxy to unix socket
            SetHandler "proxy:unix:/var/run/php/php7.4-fpm.sock|fcgi://localhost/"
        </FilesMatch>
    ...
</VirtualHost>

As I said, it was working fine for several months. Now, since some update, it fail to match and is using php 8.0 for all sites.

Is there some syntax change ?

NOTE: Both PHP services 8.0 and 7.4 are running just fine.

NOTE 2: Im using ppa:ondrej/apache2 and ppa:ondrej/php

francogp
  • 317
  • 2
  • 11
  • This has annoyed a lot of other people this week too. Your issue has been posted already here: https://askubuntu.com/questions/1316859/php-fpm-working-but-ignoring-version-from-sethandler – Adambean Feb 17 '21 at 13:29

1 Answers1

0

This seems to fix the problem

<FilesMatch \".+\.ph(ar|p|tml)$\"> # Apache 2.4.10+ can proxy to unix socket
   <If \"-f %{REQUEST_FILENAME}\">
      SetHandler \"proxy:unix:/run/php/php7.4-fpm.sock|fcgi://localhost\"
   </If>
</FilesMatch>
francogp
  • 317
  • 2
  • 11