Permalink
Browse files

minor #4762 [Cookbook][Configuration] update text to use SetHandler (…

…not ProxyPassMatch) (xabbuh)

This PR was merged into the 2.3 branch.

Discussion
----------

[Cookbook][Configuration] update text to use SetHandler (not ProxyPassMatch)

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | all
| Fixed tickets |

This reflects the changes to the default configuration introduced with #4708 in the introduction.

Commits
-------

9d84d03 update text to use SetHandler (not ProxyPassMatch)
  • Loading branch information...
weaverryan committed Jan 4, 2015
2 parents 43543bb + 9d84d03 commit f4f8621ec02d91fe7947ab5c320337296e90185c
Showing with 6 additions and 13 deletions.
  1. +6 −13 cookbook/configuration/web_server_configuration.rst
@@ -118,7 +118,7 @@ Using mod_proxy_fcgi with Apache 2.4
If you are running Apache 2.4, you can easily use ``mod_proxy_fcgi`` to pass
incoming requests to PHP-FPM. Configure PHP-FPM to listen on a TCP socket
(``mod_proxy`` currently `does not support unix sockets`_), enable ``mod_proxy``
and ``mod_proxy_fcgi`` in your Apache configuration and use the ``ProxyPassMatch``
and ``mod_proxy_fcgi`` in your Apache configuration and use the ``SetHandler``
directive to pass requests for PHP files to PHP FPM:
.. code-block:: apache
@@ -133,14 +133,17 @@ directive to pass requests for PHP files to PHP FPM:
# SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
# For Apache 2.4.9 or higher
# Using SetHandler avoids issues with using ProxyPassMatch in combination
# Using SetHandler avoids issues with using ProxyPassMatch in combination
# with mod_rewrite or mod_autoindex
<FilesMatch \.php$>
SetHandler proxy:fcgi://127.0.0.1:9000
</FilesMatch>
# If you use Apache version below 2.4.9 you must consider update or use this instead
# ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/project/web/$1
# If you run your Symfony application on a subpath of your document root, the
# regular expression must be changed accordingly:
# ProxyPassMatch ^/path-to-app/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/project/web/$1
DocumentRoot /var/www/project/web
<Directory /var/www/project/web>
# enable the .htaccess rewrites
@@ -152,16 +155,6 @@ directive to pass requests for PHP files to PHP FPM:
CustomLog /var/log/apache2/project_access.log combined
</VirtualHost>
.. caution::
When you run your Symfony application on a subpath of your document root,
the regular expression used in ``ProxyPassMatch`` directive must be changed
accordingly:
.. code-block:: apache
ProxyPassMatch ^/path-to-app/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/project/web/$1
PHP-FPM with Apache 2.2
~~~~~~~~~~~~~~~~~~~~~~~

0 comments on commit f4f8621

Please sign in to comment.