Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [varnish]

Varnish is a high-performance reverse proxy and load-balancer package for Linux/Unix systems.

Filter by
Sorted by
Tagged with
0 votes
1 answer
21 views

How to force SSL on Nginx & Varnish

how can i redirect only to https in Nginx and varnish. I use varnish cache in port 80 and Nginx listening on 8080. Works fine in http, but i need to add SSL. my configuration is as follows server { ...
user avatar
  • 1
0 votes
1 answer
12 views

Pros and Cons of a `.port` backend v. a `.host` backend in Varnish

At work we have a varnish cluster. All the remote backends us the .host value (which I assume is required) but all the configs for the local backend, ie the backend running on the server the config/...
user avatar
1 vote
1 answer
120 views

How to implement caching of HTTP responses in Kubernetes?

How can I cache HTTP responses from my services in Kubernetes? I have a simple web service in my cluster and am wondering how I could cache static assets (static html, images, fonts, etc.) beyond ...
user avatar
  • 111
0 votes
1 answer
17 views

Update request cookie for Varnish ESI-include requests from initial `beresp`

I have an application that is fronted by a Varnish server. Parts of the page is rendered using ESI includes. My problem is that the upstream response includes an encrypted session cookie, which among ...
user avatar
  • 103
0 votes
1 answer
26 views

Varnish refusing to cache by calling "hit_for_pass"

13 StatSess c 127.0.0.2 48714 0 1 1 0 1 1 687 2573 24 BackendXID b 1374630903 24 TxRequest b GET 24 TxURL b /do_ajax.php?action=get-dom 24 TxProtocol b HTTP/1.0 24 ...
user avatar
  • 7
0 votes
0 answers
24 views

As of this morning varnish is not listening on configured port 80

I've had varnish running on my site for awhile now configured to listen on port 80 and apache on port 8080. This morning I noticed that varnish is now listening on port 6081. When I systemctl restart ...
user avatar
0 votes
1 answer
41 views

varnish cache not working for ajax calls

if (req.url ~ "do_ajax.php" && req.request == "GET") { return (lookup); } I put this line inside the varnish.vcl config, but I get this header in the response header:...
user avatar
  • 7
0 votes
1 answer
25 views

How to return banned objects length in varnish purge?

i am Using Varnish 6.0 LTS in debian iam using magento2 vcl 6 from here: https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/PageCache/etc/varnish6.vcl when i issue a curl request ...
user avatar
  • 101
0 votes
1 answer
75 views

Varnish 4.1 - How to serve cached copy on backend fetch failed instead of 503

I have a site served by apache+tomcat and a cache served by Varnish 4.1 When apache is down, varnish always returns a 503 error. I would like varnish to return the copy of the pages it has in its ...
user avatar
  • 25
0 votes
1 answer
24 views

How do you log the requests that are not getting a cache hit on varnish?

Made a new theme on Wordpress, the new theme is very similar to the old one, meaning there shouldn't be any major SQL queries change, probably less, but the website is slow and it seems it comes from ...
user avatar
  • 7
0 votes
1 answer
19 views

How to distribute Varnish cache differently to different kind of requests?

I have a redirect in my store that shows a different store view based on the client's location. It reads the header via Fastly and redirects the customer to a different store view using every time the ...
user avatar
0 votes
1 answer
17 views

Determining if varnish config changes are needed after adding 3 new cookies

# Keep all these cookie if (req.http.Cookie) { set req.http.Cookie = ";" + req.http.Cookie; set req.http.Cookie = regsuball(req.http.Cookie, "; +", ";"); set req....
user avatar
  • 3
0 votes
2 answers
96 views

apache behind varnish; htaccess deny rules ignored

So, I have a wordpress website running behind nginx -> varnish -> httpd The htaccess rule for wp-login.php is set as: <Files wp-login.php> allow from client ip deny from all </Files> ...
user avatar
0 votes
1 answer
59 views

Varnish sometimes (up to ~5% of the requests) triggers err_too_many_redirects, running in docker combined with plesk for wordpress [closed]

We've followed these instructions https://support.plesk.com/hc/en-us/articles/115001888894-Does-Plesk-support-Varnish- and were able to get it to work 'properly', it serves the wordpress site through ...
user avatar
0 votes
0 answers
107 views

Varnish returning 503 and 500 errors without Apache or php-fpm showing any error that could explain it

Increased varnish log and increased Apache logs and found: [Thu Oct 28 10:54:02 2021] [notice] caught SIGTERM, shutting down [Thu Oct 28 10:54:02 2021] [notice] suEXEC mechanism enabled (wrapper: /usr/...
user avatar
  • 17
0 votes
1 answer
64 views

401 Authorization Required on Apache 2.2 when curling leads to 500 varnish error

[centos@staging03 ~]$ sudo netstat -plnt Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp ...
user avatar
  • 17
0 votes
0 answers
39 views

Using an IP address (and port)

Cross posting from SO: https://stackoverflow.com/questions/69722698/using-an-ip-address-and-port Ubuntu 18/Varnish 4.x I'm not sure what I'm missing. The documentation (http://manpages.ubuntu.com/...
user avatar
0 votes
1 answer
43 views

"FetchError no backend connection" error when Apache is running

[centos@ip-172-35-25-65 ~]$ varnishlog 0 CLI - Rd ping 0 CLI - Wr 200 19 PONG 1635280998 1.0 0 CLI - Rd ping 0 CLI - Wr 200 19 PONG 1635281001 1.0 ...
user avatar
  • 17
0 votes
1 answer
52 views

Varnish seems to not be using my `file` storage configuration

I've configured Varnish to use a file storage. Varnish seems to be working, but the cache seems to be a fraction of the size I've specified and the file I've specified for the storage does not seem to ...
user avatar
1 vote
1 answer
386 views

Varnish with Basic auth returns 401

I've tried to configure Varnish on server which has Basic Auth authentication by using these solutions: https://stackoverflow.com/a/40424168/7202171 https://blog.tenya.me/blog/2011/12/14/varnish-http-...
user avatar
0 votes
1 answer
70 views

Is there a way to write the query parameters as cookie in nginx

I would like to ask if there's a way to set the query parameters as the cookie of a certain url? Currently i'm having trouble with the varnish and nginx cause it was stripping the utm params which ...
user avatar
0 votes
1 answer
346 views

Varnish doesn't open backend connection

How can I connect Varnish container with PHP-FPM + NGINX containers? Docker started correctly, site works but backendopen logs are empty. Backend is healthy (returns HTTP 200 status). varnishlog -g ...
user avatar
0 votes
0 answers
57 views

Varnish probe thinks web is down if he gets 103 http code

This is my first post in this forum and I will say that I am sorry for all the mistakes that I will make in this post. This is a desperate call for help as I was not able to find any kind of ...
user avatar
0 votes
1 answer
171 views

Easiest Way to Temprarily Disable Varnish Cache (varnishadm)

What is the easiest way to tell varnish: Hey Varnish processes, please clear your cache. And also please don't cache anything at all right now. I want you to just pass all requests straight to the ...
user avatar
0 votes
1 answer
131 views

Prevent varnish from caching cookie response

When varnish returns a cache, does it also return the cookie generated on the backend or only the css, images and html returned to the frontend? I had users tell me that they kept getting the wrong ...
user avatar
0 votes
1 answer
43 views

cancel varnish cache so that it goes to the backend on the homepage only

if (req.url == "/") { return(pass); } Does this allow us to cancel the varnish only on the homepage (ex: www.prism.com) and not other pages like www.prism.com/product? I was thinking this ...
user avatar
0 votes
1 answer
35 views

Can varnish serve from a port and clone the request to another port?

I have a problem to solve in my current deployment. The current one looks like this. Varnish on port 80 in front of Nginx on port 8000 backed by uWSGI The problem here is, The client want to implement ...
user avatar
  • 103
0 votes
0 answers
102 views

Cache Images centrally

Application: Serve responsive and optimized images on the fly by cropping/resizing/compressing master images Current Load: 10k request per minute, ~60MBps traffic. Current Config : NginxPlus LB sits ...
user avatar
1 vote
0 answers
92 views

Failed to restart varnish.service: Unit not found

[root@server21 ~]# service varnish restart Redirecting to /bin/systemctl restart varnish.service Failed to restart varnish.service: Unit not found. This worked like 3 days ago, but today it stopped ...
user avatar
  • 17
0 votes
0 answers
33 views

Fail2ban regex for multiple IPs which includes LB IPs into it

Struggling with the correct regex for the below log which I am not able to parse to get it working with fail to ban. I need XX.XXX.XX.XX to be checked via fail2ban. Please assist which me the correct ...
user avatar
0 votes
0 answers
46 views

Varnish caching issue in the 'Add to cart' section ,,, Drupal,Nginx,Php-Fpm

We are running an ecommerce site configured by drupal with nginx & php-fpm. We also use memcached with mysql database.The service was running smoothly before we enabled the varnish caching. After ...
user avatar
0 votes
1 answer
22 views

Disable dynamic logging

Message from syslogd@dev01 at Jun 18 09:23:49 ... varnishd[8318]: no cookie Message from syslogd@dev01 at Jun 18 09:23:49 ... varnishd[8318]: no cookie Message from syslogd@dev01 at Jun 18 09:23:...
user avatar
  • 5
0 votes
1 answer
65 views

How do you let a call through in varnish when a cookie "lang" is not set?

How do you let a call through in varnish when a cookie "lang" is not set? I want to let a call go through and not return the cache when the cookie "lang" is set and send the ...
user avatar
  • 5
0 votes
1 answer
365 views

Varnish cache in nginx reverse proxied WHM [closed]

We have our production server with latest cpanel version "96.0 (build 8)" and it is running nginx with reverse proxy enabled. See the netstat screenshot attached for detailed information. ...
user avatar
-1 votes
1 answer
161 views

Docker Swarm and load-balancing of Varnish persistent TCP connections (VIP)

I have a Varnish HTTP cache running in front of 40 workers. These workers are running on two identical Docker nodes (node-1 and node-2, 20 on each) as a unique service (web_workers). We're using ...
user avatar
  • 99
0 votes
2 answers
806 views

Varnish not keeping cache for more than a few minutes

I am running a Magento 2 site that is going very slow because Varnish will not keep it's cache for more than a few minutes. Here is the default.vcl file: # VCL version 5.0 is not supported so it ...
user avatar
0 votes
0 answers
22 views

I can't install locales due to varnish cache

We're having locale issues on a server, but if I am to install locales it will uninstall varnish. It's Debian 8 and a test system, so nothing in production will be affected. Is there a way to install ...
user avatar
1 vote
1 answer
525 views

Magento 2 with Nginx and Varnish - How to serve webp images

I am using the following, trying to serve webp images from Magento using Nginx and Varnish as caching. Added to /etc/nginx/mime.types image/webp webp; Added to main nginx.conf http { map $...
user avatar
0 votes
1 answer
159 views

Varnish - How can I set TTL in response header?

I have not tried this before on Varnish. And I must admit that my last experience with Varnish was way back - version 2.1.5 days! I have set varnish 6.x as a simple/basic static http-cache. I have ...
user avatar
  • 637
0 votes
0 answers
64 views

Varnish (6.2.1) , Apache Version(Server version: Apache/2.4.41 (Ubuntu)) , HA-Proxy version 2.0.13-2

Need help in varnish why varnishlog command is not working it does not throws any response. root@r2m-web-prod:/etc/varnish# cat /lib/systemd/system/varnish.service [Unit] Description=Varnish HTTP ...
user avatar
  • 1
0 votes
1 answer
634 views

HA-Proxy errors in configuration file

Below is the configuration file for my haproxy in which i want to setup the varnish as backend & in frontend want to configure the Port-80 for http & for the port-443 for https global log /dev/...
user avatar
  • 1
1 vote
1 answer
276 views

Varnish 6.x — stale-if-error implementation

I was investigating if varnish can support Stale content as described in RFC 5861. To achieve this stale-while-revalidate and stale-if-error cache directives I found a sample implementation for ...
user avatar
  • 457
1 vote
1 answer
193 views

Varnish 'client.ip' not available in method 'vcl_backend_response'

Due to server upgrade we had to migrate from Varnish 3 to Varnish 4. With little experience with the server I have able to update the setup and variables needed for the newer version but unfortunately ...
user avatar
0 votes
1 answer
22 views

Hitch installation completed with insserv errors. Unable to start hitch

I am trying to install hitch to terminate the certificates for the Varnish reverse proxy on my Ubuntu 16.04 VPS. The installation completes with the following messages and Hitch service doesnt startup....
user avatar
2 votes
1 answer
965 views

Unable to open Port 8080 for Varnish to access Nginx

I am setting up Varnish and Hitch to serve incomming HTTP and HTTPS requests for my Drupal Website. The Drupal website runs on Nginx on a Digital Ocean VPS and was listening on port 80 and 443. I have ...
user avatar
0 votes
1 answer
501 views

Wrong client IP passed to Apache from Varnish and HAProxy

I have a setup where I am using Varnish/Hitch >> HAProxy >> Apache. It works except for a problem where the client IP address isn't being passed correctly to the backend Apache server. ...
user avatar
  • 51
0 votes
1 answer
1k views

Why is varnish not restarting after I change port

Solved. See my solution below My system: 1. varnish 6 2.Centos 7 controlled on cwp pro panel, 3.webserver configuration: Nginx & Varnish & Apache ([Varnish Conf]) Additional Options: php-cgi/...
user avatar
  • 1
1 vote
1 answer
535 views

Can Varnish automatically determine which storage medium should be used to cache an object?

For instance, I have an incredibly slow and archaic backend provider with requests regularly taking in the tens of seconds. We also have a machine with moderate memory and large storage. Ideally, I'...
user avatar
0 votes
1 answer
318 views

Hitch rate limiting without Varnish

Good morning, Is there a way to implement per-site and per-IP rate limiting on Hitch before the request reach Varnish? I tried to handle some DoS attack using Varnish rate limiting, but the DoS can ...
user avatar
0 votes
0 answers
707 views

Why does Varnish eat up all memory despite having both transient and malloc limits?

I'm using Varnish to cache static files in front of an Apache2 webserver. It's a mix of small files (CSS/JS/images) and large files (from 200 MB to 2 GB). I've limited both transient and malloc ...
user avatar
  • 193

1
2 3 4 5
19