Add a bunch of PHP-related config files
[sysconfig/apache2.git] / conf-available / php8.1-fpm.conf
1 # Redirect to local php-fpm if mod_php is not available
2 <IfModule !mod_php8.c>
3 <IfModule proxy_fcgi_module>
4     # Enable http authorization headers
5     <IfModule setenvif_module>
6     SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
7     </IfModule>
8
9     <FilesMatch ".+\.ph(ar|p|tml)$">
10         SetHandler "proxy:unix:/run/php/php8.1-fpm.sock|fcgi://localhost"
11     </FilesMatch>
12 # The default configuration works for most of the installation, however it could
13 # be improved in various ways. One simple improvement is to not pass files that
14 # doesn't exist to the handler as shown below, for more configuration examples
15 # see https://wiki.apache.org/httpd/PHP-FPM
16 #    <FilesMatch ".+\.ph(ar|p|tml)$">
17 #        <If "-f %{REQUEST_FILENAME}">
18 #            SetHandler "proxy:unix:/run/php/php8.1-fpm.sock|fcgi://localhost"
19 #        </If>
20 #    </FilesMatch>
21     <FilesMatch ".+\.phps$">
22         # Deny access to raw php sources by default
23         # To re-enable it's recommended to enable access to the files
24         # only in specific virtual host or directory
25         Require all denied
26     </FilesMatch>
27     # Deny access to files without filename (e.g. '.php')
28     <FilesMatch "^\.ph(ar|p|ps|tml)$">
29         Require all denied
30     </FilesMatch>
31 </IfModule>
32 </IfModule>