I have a fresh Pop!OS 20.10 (Basically Ubuntu for those not familiar with Pop!OS). I've installed Apache, php 7.2, 7.4 & 8.0. Each version is running as FPM and each service is up and running. I have several vhosts setup and using FilesMatch to indicate which version of php should run on each host.
The problem is they all show php 8.0 when running phpinfo() no matter what the vhost config says. Anyone have any ideas?
Here's one of the host files:
<VirtualHost zr1.local:80>
<FilesMatch \.php$> # Apache 2.4.10+ can proxy to unix socket
SetHandler "proxy:unix:/run/php/php7.4-fpm.sock|fcgi://localhost/"
</FilesMatch>
DocumentRoot "/var/www/zr1/web"
ServerName zr1.local
<Directory "/var/www/zr1/web">
AllowOverride All
Options +FollowSymLinks
Order allow,deny
Allow from all
<IfModule mod_rewrite>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /app.php [QSA,L]
</IfModule>
</Directory>
FPM service:
php7.4-fpm.service - The PHP 7.4 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.4-fpm.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2021-02-15 14:38:26 EST; 1h 28min ago
Docs: man:php-fpm7.4(8)
Process: 27667 ExecStartPost=/usr/lib/php/php-fpm-socket-helper install /run/php/php-fpm.sock /etc/php/>
Main PID: 27664 (php-fpm7.4)
Status: "Processes active: 0, idle: 2, Requests: 0, slow: 0, Traffic: 0req/sec"
Tasks: 3 (limit: 38267)
Memory: 11.5M
CGroup: /system.slice/php7.4-fpm.service
├─27664 php-fpm: master process (/etc/php/7.4/fpm/php-fpm.conf)
├─27665 php-fpm: pool www
└─27666 php-fpm: pool www
From /etc/php/7.4/fpm/pool.d/www.conf
listen = /run/php/php7.4-fpm.sock
apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2021-02-15 14:54:05 EST; 1h 25min ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 29642 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
Main PID: 29646 (/usr/sbin/apach)
Tasks: 8 (limit: 38267)
Memory: 15.3M
CGroup: /system.slice/apache2.service
├─29646 /usr/sbin/apache2 -k start
├─29647 /usr/sbin/apache2 -k start
├─29648 /usr/sbin/apache2 -k start
├─29649 /usr/sbin/apache2 -k start
├─29650 /usr/sbin/apache2 -k start
├─29651 /usr/sbin/apache2 -k start
├─29652 /usr/sbin/apache2 -k start
└─29705 /usr/sbin/apache2 -k start
Let me know if you need to see anything else.