Index of /coding/mod_phpfpm_handler

Icon  Name                       Last modified      Size  Description
[PARENTDIR] Parent Directory - [DIR] mod_phpfpm_handler-0.5/ 2017-07-24 19:18 - [   ] mod_phpfpm_handler-0.1.tgz 2014-09-15 13:30 2.4K [   ] mod_phpfpm_handler-0.2.tgz 2014-09-29 14:31 2.3K [   ] mod_phpfpm_handler-0.3.tgz 2015-03-06 12:13 3.1K [   ] mod_phpfpm_handler-0.4.tgz 2015-04-13 19:14 3.2K [   ] mod_phpfpm_handler-0.5.tgz 2015-04-15 02:53 3.3K
Easy PHP-FPM + Apache HTTP Server setup

This modules is a drop-in replacement for the common SetHandler/ProxyPassMatch
directives in PHP-FPM setups. It provides the application/x-httpd-php-handler
known from mod_php.
Apache HTTP Server 2.4.10 or above + mod_proxy_fcgi is required.

For backward compatibility the old php_value/php_flag directives are supported.
The values are serialized and passed to PHP-FPM as environment variable on
every request.
php_admin_value/php_admin_flag is intentionally *not* supported. Move over to
PHP-FPM's configuration!
Please note that PHP-FPM currently doesn't reset the settings changed from
environment at the end of the request: Bug Report + Patch

USAGE
=====
Global configuration:
LoadModule phpfpm_handler_module modules/mod_phpfpm_handler.so
<FilesMatch "\.php$">
  SetHandler application/x-httpd-php
</FilesMatch>

Per VirtualHost configuration:
<VirtualHost *:80>
  [...]
  phpfpm_url "proxy:unix:/path/to/fpm_unix_socket|fcgi://php-fpm"
</VirtualHost>

This even works in directory-context and with TCP sockets:
<Directory "/path/to/foo">
  phpfpm_url "proxy:fcgi://127.0.0.1:9000"
</Directory>

HANDLE REQUEST BODY (optional)
==============================
If you have enabled request_terminate_timeout in PHP-FPM sending large
HTTP posts/uploads can be troublesome. PHP-FPM's manager will simply kill the
connection after the time has passed. So the maximum upload size is dominated
by the client's upload bandwith (and required time) instead of size.
This module supports writing the client body to a local file and passes the
path to this file to PHP-FPM. So PHP-FPM kicks in *after* the file has
successfully been uploaded. This is also known as "accelerated upload
support" (REQUEST_BODY_FILE), supported by NGINX.
Note: Currently only multipart/form-data (since v0.3) and HTTP PUT (since v0.4)
      as well as chunked transfer (used by OS X WebDAV/Finder, since v0.5)
      is being handled

Global configuration:
phpfpm_body_temp_path /dev/shm
or phpfpm_body_temp_path /tmp

DIRECTIVES
==========
phpfpm_url uri
Description: URI to PHP-FPM backend.
Context: server config, virtual host, directory

phpfpm_body_temp_path path
Description: Directory for storing temporary files holding client request bodies.
Context: server config, virtual host, directory

php_value name value
Description: PHP Value Modifier
Context: .htaccess

php_flag name value
Description: PHP Flag Modifier
Context: .htaccess

See: https://wiki.apache.org/httpd/PHP-FPM