php8.2-fpm.conf 1.4 KB

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