build on PRs; nitpicks
[plcapi.git] / tests / ci / config / apache_phpfpm_proxyfcgi
1 # @todo check: templatize this, to make it work with any php version
2
3 # Redirect to local php-fpm if mod_php is not available
4 <IfModule !mod_php8.c>
5 <IfModule !mod_php7.c>
6 <IfModule proxy_fcgi_module>
7     # Enable http authorization headers
8     <IfModule setenvif_module>
9         SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
10     </IfModule>
11
12     <FilesMatch ".+\.ph(ar|p|tml)$">
13         SetHandler "proxy:unix:/run/php/php-fpm.sock|fcgi://localhost"
14     </FilesMatch>
15     <FilesMatch ".+\.phps$">
16         # Deny access to raw php sources by default
17         # To re-enable it's recommended to enable access to the files
18         # only in specific virtual host or directory
19         Require all denied
20     </FilesMatch>
21     # Deny access to files without filename (e.g. '.php')
22     <FilesMatch "^\.ph(ar|p|ps|tml)$">
23         Require all denied
24     </FilesMatch>
25 </IfModule>
26 </IfModule>
27 </IfModule>