|
| 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 | + # Using (?:pattern) instead of (pattern) is a small optimization that |
| 10 | + # avoid capturing the matching pattern (as $1) which isn't used here |
| 11 | +# <FilesMatch "\.ph(?:ar|p|tml)$"> |
| 12 | +# SetHandler "proxy:unix:/run/php/php8.5-fpm.sock|fcgi://localhost" |
| 13 | +# </FilesMatch> |
| 14 | +# The default configuration works for most of the installation, however it could |
| 15 | +# be improved in various ways. One simple improvement is to not pass files that |
| 16 | +# doesn't exist to the handler as shown below, for more configuration examples |
| 17 | +# see https://wiki.apache.org/httpd/PHP-FPM |
| 18 | +# |
| 19 | +# CODEPOINTS.NET MODIFICATION ################################################ |
| 20 | +# |
| 21 | +# We use this alternative as suggested to prevent "Primary script unknown" |
| 22 | +# errors in the log. And we support only the .php extension. |
| 23 | + <FilesMatch "\.php$"> |
| 24 | + <If "-f %{REQUEST_FILENAME}"> |
| 25 | + SetHandler "proxy:unix:/run/php/php8.5-fpm.sock|fcgi://localhost" |
| 26 | + </If> |
| 27 | + </FilesMatch> |
| 28 | + <FilesMatch ".\.phps$"> |
| 29 | + # Deny access to raw php sources by default |
| 30 | + # To re-enable it's recommended to enable access to the files |
| 31 | + # only in specific virtual host or directory |
| 32 | + Require all denied |
| 33 | + </FilesMatch> |
| 34 | + # Deny access to files without filename (e.g. '.php') |
| 35 | + <FilesMatch "^\.ph(?:ar|p|ps|tml)$"> |
| 36 | + Require all denied |
| 37 | + </FilesMatch> |
| 38 | +</IfModule> |
| 39 | +</IfModule> |
0 commit comments