
一旦我啟用 php8.1-fpm.conf,我的所有網站都會從使用 php7.4-fpm 切換到 php8.1-fpm。我所有的虛擬主機檔案都將 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。我正在尋找線索來追蹤我的配置錯誤可能在哪裡,我已經啟用了必要的模組本文檔。