# Proxy all PHP file requests through PHP-FPM. # # Based on /etc/apache2/conf-available/php7.3-fpm.conf but modified to not break # when PHP version upgrade happens due to php-fpm package depending on the # latest version of PHP. Since PHP-FPM unix sockets have version number their # path, to work with future version of PHP, hack assuming some future versions. # Redirect to local php-fpm if mod_php is not available # Enable http authorization headers SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1 SetHandler "proxy:unix:/run/php/php-fpm.sock|fcgi://localhost" SetHandler "proxy:unix:/run/php/php7.4-fpm.sock|fcgi://localhost" SetHandler "proxy:unix:/run/php/php7.3-fpm.sock|fcgi://localhost" Require all denied # Deny access to raw php sources by default # To re-enable it's recommended to enable access to the files # only in specific virtual host or directory Require all denied # Deny access to files without filename (e.g. '.php') Require all denied