Skip to content

Commit f4f8621

Browse files
committed
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)
2 parents 43543bb + 9d84d03 commit f4f8621

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

cookbook/configuration/web_server_configuration.rst

+6-13
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ Using mod_proxy_fcgi with Apache 2.4
118118
If you are running Apache 2.4, you can easily use ``mod_proxy_fcgi`` to pass
119119
incoming requests to PHP-FPM. Configure PHP-FPM to listen on a TCP socket
120120
(``mod_proxy`` currently `does not support unix sockets`_), enable ``mod_proxy``
121-
and ``mod_proxy_fcgi`` in your Apache configuration and use the ``ProxyPassMatch``
121+
and ``mod_proxy_fcgi`` in your Apache configuration and use the ``SetHandler``
122122
directive to pass requests for PHP files to PHP FPM:
123123

124124
.. code-block:: apache
@@ -133,14 +133,17 @@ directive to pass requests for PHP files to PHP FPM:
133133
# SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
134134
135135
# For Apache 2.4.9 or higher
136-
# Using SetHandler avoids issues with using ProxyPassMatch in combination
136+
# Using SetHandler avoids issues with using ProxyPassMatch in combination
137137
# with mod_rewrite or mod_autoindex
138138
<FilesMatch \.php$>
139139
SetHandler proxy:fcgi://127.0.0.1:9000
140140
</FilesMatch>
141141
# If you use Apache version below 2.4.9 you must consider update or use this instead
142142
# ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/project/web/$1
143-
143+
# If you run your Symfony application on a subpath of your document root, the
144+
# regular expression must be changed accordingly:
145+
# ProxyPassMatch ^/path-to-app/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/project/web/$1
146+
144147
DocumentRoot /var/www/project/web
145148
<Directory /var/www/project/web>
146149
# enable the .htaccess rewrites
@@ -152,16 +155,6 @@ directive to pass requests for PHP files to PHP FPM:
152155
CustomLog /var/log/apache2/project_access.log combined
153156
</VirtualHost>
154157
155-
.. caution::
156-
157-
When you run your Symfony application on a subpath of your document root,
158-
the regular expression used in ``ProxyPassMatch`` directive must be changed
159-
accordingly:
160-
161-
.. code-block:: apache
162-
163-
ProxyPassMatch ^/path-to-app/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/project/web/$1
164-
165158
PHP-FPM with Apache 2.2
166159
~~~~~~~~~~~~~~~~~~~~~~~
167160

0 commit comments

Comments
 (0)