Skip to content

Instantly share code, notes, and snippets.

@alekstrust
Created January 4, 2018 00:17
Show Gist options
  • Save alekstrust/4be458cd38b7a1fbcabe47d85b692b76 to your computer and use it in GitHub Desktop.
Save alekstrust/4be458cd38b7a1fbcabe47d85b692b76 to your computer and use it in GitHub Desktop.
PHP-FPM configuration for Apache HTTP 2.4
# This configuration requires httpd 2.4 with support for UDS (Unix domain
# sockets). This was added upstream in version 2.4.10, and was also backported
# to 2.4.6 in EL7.
# The following lines prevent .user.ini files from being viewed by Web clients.
<Files ".user.ini">
Require all denied
</Files>
# Allow php to handle Multiviews.
AddType text/html .php
# Add index.php to the list of files that will be served as directory indexes.
DirectoryIndex index.php
# Enable http authorization headers.
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
<FilesMatch \.php$>
SetHandler "proxy:fcgi://127.0.0.1:9000"
#SetHandler "proxy:unix:/run/php-fpm/www.sock|fcgi://localhost"
</FilesMatch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment