一旦启用 php8.1-fpm.conf,我的所有网站都会从使用 php7.4-fpm 切换到 php8.1-fpm。我的所有 vhost 文件都将 fpm 处理程序添加到以下<VirtualHost *:80>
块中:
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName www.somesite.info
# Only if there will be a temporary subdomain:
DocumentRoot /srv/www/somesite.info/web/
ErrorLog /srv/www/somesite.info/logs/error.log
CustomLog /srv/www/somesite.info/logs/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.somesite.info
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
<FilesMatch \.php$>
SetHandler "proxy:unix:/var/run/php/php7.4-fpm.sock|fcgi://localhost"
</FilesMatch>
</VirtualHost>
# Handle all other domains/subdomains
<VirtualHost *:80>
ServerName somesite.info
Redirect 301 / http://www.somesite.info/
RewriteEngine on
RewriteCond %{SERVER_NAME} =somesite.info
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
对于每个 php-fpm,我使用的是 7.4 和 8.1。我正在寻找线索来追踪我的配置错误可能出在哪里,我已经启用了必要的模块本文档。