Questions tagged [varnish]
Varnish is an open source reverse HTTP proxy with extensive caching abilities, i.e. a web accelerator. It is frequently used in front of websites to cache webpages in memory.
2,078
questions
0
votes
0
answers
6
views
Renaming cache tags in API Platform
We are using API Platform with Varnish as proxy.
API Platform returns a Cache-tags header. Unfortunately this header tends to grow in size very fast until it reaches Varnish header size limit.
We can'...
1
vote
1
answer
34
views
+50
Terminate backend fetch when client disconnects from varnish
I'm using varnish as a caching layer and I have a question:
When a client closes connection to varnish early (before receiving the response) then is it possible to close the backend fetch? So that ...
0
votes
1
answer
23
views
Symbol not found: 'bereq.is_bgfetch' (expected type BOOL)
I am certainly doing something wrong or I am missing something because it is driving me crazy.
I am using Varnish 6
in defautl.vcl, I am trying to not cache 5xx errors and preserve the existing cache
...
0
votes
2
answers
47
views
Varnish 7.4.2 VARY cookie and compression problem
I use on my servers varnish 7.1.2 and I want to upgrade to varnish 7.4.2
Everything is OK but since I've make the upgrade, I've noticed a strange behaviour:
When I made a curl, I see that VARY cookie ...
1
vote
2
answers
80
views
Symfony Sulu Varnish using ESI
We are using Symfony (Sulu) with Varnish as reverse proxy, with tag based invalidation (xkey) which works as expected. Now we want to use ESI for dynamic blocks on our website, separate from the "...
0
votes
1
answer
32
views
How To Force Varnish Cache to Keep All Cached Pages Indefinitely?
We currently have a Varnish cache server configured in from of our Magento website. We run a cache warmer daily which pulls the sitemaps from the site and uses them to hit every page of our site in ...
0
votes
1
answer
28
views
How to monitor active threads in varnishd?
how do you monitor running threads in varnishd in production?
We have configured varnishd to max threads = min threads = 1000.
We are monitoring the MAIN.threads and MAIN.threads_created metric, but ...
1
vote
1
answer
39
views
Mixed content error when accessing HTTPS website using Hitch as a TLS Proxy with Varnish on WordPress?
The https version of my website is getting a mixed content error.
I have the following setup
Traffic on Port 443 is running the Hitch TLS Proxy which is forwarded to Varnish and finally ends in Apache ...
0
votes
1
answer
52
views
Why does limit_except GET { deny all; } not work for PURGE requests when using nginx_http_mirror_module?
I am trying to mirror all GET requests on my nginx server, to another web application for split testing. This works and filters all request types but GET - but - unfortunately it also sends PURGE ...
0
votes
1
answer
23
views
Varnish/Fastly - Georedirecting All Site URLs to One Page Except for the Store Locator
I am attempting to redirect all traffic from certain countries to one centralized page (fall-2023-collection) except for one other page (store-locator). I have the redirection working in the sense ...
0
votes
1
answer
30
views
upgrade http:// to https:// when using Hitch
I'm trying to use Hitch to add https support for one old project with own http server written in C.
The Hitch itself is working, but is there any way how to handle, when user try to use http?
E.g. I ...
0
votes
1
answer
68
views
Docker + traefik + varnish for magento 2 app
I would like to know if it's possible to configure for a local usage a docker compose with both traefik and varnish.
I have created my magento 2 image with nginx on the port 8080.
When I use traefik ...
0
votes
1
answer
23
views
How to invalidate an URL in Varnish in the way, that old version is still served until new version is cached
I'd like to mark a number of URL in Varnish as invalid in some cases from backend and keep them served from cache until the new version is fetched from the backend. From my understanding and ...
0
votes
1
answer
187
views
Ubuntu 22.04 with varnish 7.0.3 memory issues
I currently have a problem with varnish 7.0.3 on ubuntu 22.04.
I'm using varnish to serve Magento frontend. Right now I have a problem with the varnish Transient storage. It keeps increasing and never ...
0
votes
0
answers
219
views
NGINX - External Service Interaction via HTTP Header Injection
I have received the "External Service Interaction via HTTP Header Injection" vulnerability report from security team upon scanning the customer facing domain:
Nginx is configured as proxy/LB ...
-2
votes
1
answer
56
views
Vanish to Hitch HTTPS SERViCE
setting img
A web server was built on the internal network (no internet connection). Users must be able to access internal users and external (public) users.
A situation where a web server cannot be ...
0
votes
0
answers
58
views
Laravel Cache Driver Issue: How to Use Varnish as Cache Driver? Getting "Driver [varnish] is not supported" Error
I have a Laravel project where I am trying to use Varnish as the cache driver. I have followed several online resources to set up Varnish in Laravel, but I still encounter the error "Driver [...
0
votes
2
answers
36
views
Install Varnish with Magento2 along with Nginx
I need assistance with configuring Varnish with Magento 2 and Nginx. I have attempted the configuration, but I'm encountering a persistent 503 backend error.
I have replaced the default.vcl file with ...
-1
votes
1
answer
52
views
varnish is failed to get started
[root@neacdn1 system]# systemctl status varnish.service
● varnish.service - Varnish Cache, a high-performance HTTP accelerator
Loaded: loaded (/usr/lib/systemd/system/varnish.service; enabled; vendor ...
2
votes
0
answers
111
views
Symfony error with Varnish HTTP/1.1 404 Not Found returned for "http://localhost:8585/"
I tried to follow this documentation : https://api-platform.com/docs/v2.6/core/performance/
which is sadly a bit poor in order to configure varnish with api platform.
For the information I have PHP ...
0
votes
1
answer
109
views
Why my Varnish hitrate is so low (around 30%)?
We are running Varnish 6 with Magento 2.4.5 and Nginx, and we have about 1000-1500 pages. The Varnish instance is configured with 2048m, but the majority of pages are not being cached.
We conducted ...
0
votes
0
answers
36
views
Varnish ejecting pages before their expiry date, despite cache not full
I'm running Varnish behind an Nginx reverse proxy with an apache 2 backend serving a Drupal 7 site.
I've recently moved to a new server, this time running Ubuntu 22.04, meaning that I've upgraded the ...
0
votes
2
answers
107
views
How to insert a variable in Varnish regex
I have a variable I'd like to include in Varnish regex match, but having trouble finding the correct syntax, example below. Appreciate any tips.
if (req.url !~ "slreturn=(req.http.yearMonthDay)&...
0
votes
2
answers
778
views
Varnish memory usage keeps increasing
we have an issue with varnish memory usage fine tuning.
This happens on our two EC2 instances t4g.medium (4gb ram).
Varnish memory usage keeps increasing till the instance crashes.
We tried by using ...
0
votes
1
answer
186
views
I need to remove woocommerce_recently_viewed cookie request by WooCommerce
I tried to remove woocommerce_recently_viewed and wp_woocommerce_session_ from request because they caused the cache to bypass. How can I get rid of them?
-- BerespHeader Set-Cookie: ...
0
votes
1
answer
72
views
Downgrading varnish service from 6.2.3 to 6.0.11 through RPM
while insatlling this package "MI-varnish6-modules.x86_64" in one of the varnish servers facing this error
Processing Dependency: libvarnishapi.so.2(LIBVARNISHAPI_2.0)(64bit) for package: MI-...
0
votes
1
answer
153
views
Why Varnish does not work with nginx ssl?
I have a server on Ubuntu 20.04.6 using Nginx with ssl and Varnish 6.2.1. I'm getting the error:
400 Bad Request The plain HTTP request was sent to HTTPS port nginx/1.18.0 (Ubuntu)
My /etc/nginx/sites-...
0
votes
2
answers
296
views
varnish throwing 503 error after separating it into container
Below are the Varnish container and its log and application container and its log.
before i separate varnish into container the varnish was working fine within application container with the same ...
0
votes
1
answer
138
views
How to install discourse forum along with multiple sites via varnish & hitch proxy
I'm using virtualmin with apache for my other sites.
apache listening one port 8080
varnish port 80
hitch port 443
discourse port 8081
With below default.vcl file, there isn't any problem with my ...
0
votes
2
answers
167
views
How to Redirecting HTTP to HTTPS, while terminating ssl via apache and varnish configuration
I'm using virtualmin with apache. Configured varnish, and want to terminate ssl with apache.
Apache is listening two ports 443 & 8080
varnish listening port 80
Error that I'm facing:
http to https ...
0
votes
1
answer
143
views
HAproxy retries are not working as expected
My http backend (Varnish) sometimes responds with 503 errors for about 2-3 seconds. During that, HAproxy responds with 503 for all requests to that frontend/backend by that client. I want HAproxy to ...
0
votes
1
answer
96
views
Varnish beresp.url - How to alter response coming from backend to varnish?
I'm trying to alter a response that send to varnish ( after the initial request ) from varnish backend .
I have the code below that should clean the url querires that sent by backend , ...
0
votes
1
answer
206
views
Varnish VCL to get a header from the origin and associate it with a sessionid for future cache lookups
We have a number of user roles, and would like Varnish to cache the authenticated pages as many users are in each role.
In theory, we could add the role code to the request, eg, as a cookie, then ...
0
votes
2
answers
88
views
How to strip UTM tags in Varnish without stripping queries I want?
I'm looking for some help with a rule (a regex) in Varnish that I'm using to ensure that, e.g., UTM tags don't create a new cached entry for every unique query I receive. Here's my rule:
if (req....
-1
votes
1
answer
208
views
How do I know if Varnish cache is working on my WordPress website?
I have a WordPress website installed on my Cloudways managed server. Cloudways offer Varnish cache and I have that enabled from the server side.
In my WordPress website, I have installed a plugin ...
0
votes
2
answers
178
views
Is it possible to create two layers of multi-tiered cache based on memory -> disk cache layers on the same machine?
Is it possible to create two layers of multi-tiered cache based on memory -> disk cache layers on the same machine? We would like to create two layers of tiered cache based on memory -> disk ...
0
votes
1
answer
85
views
What is the correct IP syntax to block an IP range (subnet) with Varnish acl unwanted?
Trying to configure my Varnish .vcl file as I need to block a bot accessing my site and messing up my Analytics weekly.
This is what I have, but it's not working.
I need to block all subnet IP. This ...
0
votes
1
answer
304
views
Varnish - use the cache when UTM_, gclid and other campaign params are used, otherwise pass if other querystring present
In short, how can the following rule be changed to allow caching if specified querystring parameters are present, but disallow caching if they are mixed with any other undefined parameters?
if (req....
0
votes
0
answers
46
views
Vsthrottle block duration is not working properly on high volume of traffic
We have fourth parameter block in function is_denied(key, limit, period, block). Which basically blocks key for that length of time after hitting the threshold.
We have tested it and it's working ...
0
votes
1
answer
461
views
Varnish: 400 bad request for / only
I have varnish server that is timing out only for requests coming to site / (https://example.com/) while all other requests being processed normally. Ex: (example.com/en)
The output of varnish log is:
...
0
votes
2
answers
245
views
How to exclude URL from Varnish cache?
I found here and on the internet several examples how to solve this, in Varnish docs also, but I didn't sort that.
Actually, I have some search URL on wordpress which looks like:
/search/foo/?content=...
0
votes
2
answers
238
views
Varnish : Make An API request to fetch data and embedd it into response header to client
I want to send a cached page back to the user But the problem is that I need to generate a unique VISITOR_ID for every new user and
send it back to the user through headers , so I need to send an API ...
0
votes
2
answers
344
views
After updating to PHP 8, setting custom HTTP Cache Headers with API platform is not working anymore
I use Varnish for my API platform endpoints in a symfony app. API platform version is 2.6 and since I made an upgrade to PHP 8, cache_headers option from API platform config is not working anymore.
I ...
1
vote
1
answer
199
views
Wordpress Perfect Varnish VCL Random 503 Error
I am using wordpress. I deploy Varnish Using Docker. This Is My default.vcl. What's Wrong With This Config?? Sometimes, Get Random 503 Error. I Exclude Wordpress Search Page Using RegEx. Also Get ...
1
vote
1
answer
145
views
How to set up a hash based director using vcl in Varnish which is using the hashed request body?
I am trying to set up Varnish to route between backends using the request body's hash. I found good examples of using body access to set up caching where the hash of the request body is used as cache ...
0
votes
1
answer
146
views
Understanding reasons why Varnish isn't delivering cache'd version [closed]
I'm new to Varnish, and have recently set it up on my server—running MediaWiki—but I'm a little confused when trying to debug why it isn't delivering pages from the cache. I'm also using Ezoic Ads, ...
0
votes
1
answer
304
views
Using esi includes in Nuxt 2
My goal: Glue Nuxt 3 rendered code inside my old application that is written in Nuxt 2. The glue will be Varnish and using the <esi:includes
My problem:
I have .vue file
<template>
<div&...
0
votes
0
answers
224
views
Error after compile ngx_pagespeed.so module nginx version 1.22.1
Would it be worth to put nginx http2, varnish, ngx_pagespeed module, redis all combined?
I have this doubt, yesterday I tried to install ngx_pagespeed on my server but it gave me an error in console ...
0
votes
1
answer
260
views
Docker / Varnish / Hitch / Nginx / PHP : What is correct way to purge cache for specific page?
I have setup simple php app via docker by using hitch, varnish, nginx, php and mysql containers.
To make Hitch work locally I've generated self-signed certificate via mkcert utility for my.varnish....
0
votes
1
answer
266
views
How to return empty response with Varnish?
When a request come on a Varnish server, I would like to return an empty response or simply close the connection, if the requested server name is not known.
For example from nginx (the backend side of ...