You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 2.7: (21 commits)
[#5352] minor language tweak
Updated text about HTTP methods
Update http_fundamentals.rst
[HttpKernel] Fix use statement
[PSR-7] Fix Diactoros link
Fixes small typo in data transformers cookbook
some tweaks to the data transformers chapter
Updated the Symfony Versions Roadmap image
Fixed a minor typo
Fixed minor issues
Use the built-in serializer instead of promoting JMS
Removed some information wrongly rebased
Style / grammar fixes for the deployment chapter
Style / grammar fixes for the controller chapter
Style / grammar fixes for the console chapter
Removes wrong comma
Rewritten 'whether' & removed serial comma
Style / grammar fixes for the configuration chapter
Style / grammar fixes for the cache chapter
Style / grammar fixes for the bundles chapter
...
Copy file name to clipboardExpand all lines: cookbook/cache/varnish.rst
+11-12Lines changed: 11 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,17 +29,16 @@ in the Symfony configuration so that Varnish is seen as a trusted proxy and the
29
29
Routing and X-FORWARDED Headers
30
30
-------------------------------
31
31
32
-
If the ``X-Forwarded-Port`` header is not set correctly, Symfony will append
33
-
the port where the PHP application is running when generating absolute URLs,
34
-
e.g. ``http://example.com:8080/my/path``. To ensure that the Symfony router
35
-
generates URLs correctly with Varnish, add the correct port number in the
36
-
``X-Forwarded-Port`` header. This port depends on your setup.
37
-
38
-
Suppose that external connections come in on the default HTTP port 80. For HTTPS
39
-
connections, there is another proxy (as Varnish does not do HTTPS itself) on the
40
-
default HTTPS port 443 that handles the SSL termination and forwards the requests
41
-
as HTTP requests to Varnish with a ``X-Forwarded-Proto`` header. In this case,
42
-
add the following to your Varnish configuration:
32
+
To ensure that the Symfony Router generates URLs correctly with Varnish,
33
+
an ``X-Forwarded-Port`` header must be present for Symfony to use the
34
+
correct port number.
35
+
36
+
This port number corresponds to the port your setup is using to receive external
37
+
connections (``80`` is the default value for HTTP connections). If the application
38
+
also accepts HTTPS connections, there could be another proxy (as Varnish does
39
+
not do HTTPS itself) on the default HTTPS port 443 that handles the SSL termination
40
+
and forwards the requests as HTTP requests to Varnish with an ``X-Forwarded-Proto``
41
+
header. In this case, you need to add the following configuration snippet:
43
42
44
43
.. code-block:: varnish4
45
44
@@ -192,7 +191,7 @@ Symfony adds automatically:
192
191
.. tip::
193
192
194
193
If you followed the advice about ensuring a consistent caching
195
-
behavior, those vcl functions already exist. Just append the code
194
+
behavior, those VCL functions already exist. Just append the code
196
195
to the end of the function, they won't interfere with each other.
0 commit comments