Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update step 3 #219

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,31 @@ location ~ \.php$ {

**This step is only necessary if you're on Shopware >= 6.4.**

Go to [Shopware's Reverse Http Cache documentation](https://developer.shopware.com/docs/guides/hosting/infrastructure/reverse-http-cache) to configure Shopware to take Varnish into account.
Go to [Shopware's Reverse Http Cache documentation](https://developer.shopware.com/docs/guides/hosting/infrastructure/reverse-http-cache) to configure Shopware to take Varnish into account.

First, we need to enable reverse proxy support in Shopware. To do this, we must create a new file in `config/packages/storefront.yaml`:
```php
storefront:
reverse_proxy:
enabled: true
ban_method: "BAN"
# This should point to your Varnish hosts
hosts: [ "http://varnish:6081" ]
# Maximum parallel invalidations at the same time for a single worker
max_parallel_invalidations: 3
# Redis Storage for the HTTP cache tags
redis_url: "redis://redismaster:6379"
```

To assist you further, modify the following settings:

`http://varnish` to `http://varnish:6081`
`redis://redis` to `redis://redismaster:6379/`

Also, set `SHOPWARE_HTTP_CACHE_ENABLED=1` in your `.env` file.

For the correct Varnish VCL configuration and additional settings, refer to the docs: [Shopware's Reverse Http Cache documentation](https://developer.shopware.com/docs/guides/hosting/infrastructure/reverse-http-cache)


## Step Four: Implement a .vcl Into Varnish

Expand Down
Loading