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
326 views

varnish depending on the response body avoid caching

does any one know if it is possible on vanish to avoid caching if there are some "keywords" in the response body? I need something like this: sub vcl_backend_response { if (beresp.body ~ "the ...
Oliver's user avatar
  • 121
0 votes
0 answers
22 views

Deliver cache content from varnish if request comes from new IP

I have setup varnish in magento2. Suppose my website is https://example.com. When I request with curl -I https://example.com I got header value Age: 0 . In next request Age value increases. ...
linux404's user avatar
  • 173
0 votes
1 answer
267 views

I need to upgrade varnish 3 to 4 without losing cache

I would like to upgrade Varnish 3 to 4 but without losing old cache(varnish 3 cache) Could someone please help with this? I replaced the VCL file and tried to reload getting VCL syntax error. ...
Anbu's user avatar
  • 1
1 vote
0 answers
1k views

Varnish+Nginx+Magento almost like one request per second

I have been on the administrative side of a small magento 2 developers team. For the problem i am about to share you can ask for a demo page and check it out aswell you find the information shared ...
1337_sanc's user avatar
  • 131
1 vote
2 answers
765 views

Varnish cache objects for as long as possible

According to the book, Varnish automatically invalidates expired objects. By invalidates, I understand that it removes these objects from the data store, as soon as they're expired. Is there a way to ...
BenMorel's user avatar
  • 4,607
0 votes
1 answer
494 views

Varnish Cache - Cache Only Seems warmed on each browser

I am a bit confused about varnish cache and not quite sure about what is going on. I seem to have it set up my mage loads reasonably quick on first load ~800ms request. Now that it is warmed it ...
harri's user avatar
  • 185
2 votes
1 answer
458 views

Disable mod_cache if Authorization header is present

My website serves the same pages to both logged in and logged out users. Requests from logged in users have an Authorization header. I want to use Apache's mod_cache to serve cached pages only to ...
moolagain's user avatar
2 votes
1 answer
842 views

How can I redirect all domains to https in Varnish?

I'm using Apache on port 8080 Nginx on 443 Varnish on 80 I don't want to change my varnish configuration every time when I add new domain to server. I want to know if there is any regex or variable ...
Dark9Y8's user avatar
  • 41
0 votes
1 answer
778 views

Varnish Age is 0 (proxy via nginx to node app)

I'm trying to add varnish to an existing web stack but I can't seem to get a cached version of my pages back. I'd like to know I may be doing wrong. This configuration works but I do not get a cached ...
Mike's user avatar
  • 121
0 votes
1 answer
3k views

Using Apache as a https reverse proxy to varnish

In debian jessie I'm trying to serve https with a varnish reverse proxy, and I found the following solution: http://davidbu.ch/mann/blog/2015-03-20/varnish-and-https-apache.html : apache manages ssl ...
Paolo Benvenuto's user avatar
0 votes
2 answers
774 views

How many users can my server take? [duplicate]

I was told to switch to nginx or at least to mpm_worker. But really, how can I estimate if my server is not really overloaded even with mpm_prefork? My system is: GCP 1 CPU + 3,75GB Debian 8 Apache ...
Sam Tyurenkov's user avatar
0 votes
2 answers
6k views

Varnish : use multiple backends depending on URL

I have several internal sites, which I would like to reach by inserting a url with varnish. For example, if typed http://www.example.com/serv1/--->http://192.168.0.1/application1 http://...
Riccardo Grassini's user avatar
0 votes
1 answer
504 views

NGINX, GeoIP, Varnish : Too many Redirects

I own two servers. One in Singapore (data.example.me) and other one in Europe (eu.data.example.me). I want the website to serve the users from their closest server when they visit my website. I ...
Vineeth Penugonda's user avatar
0 votes
1 answer
269 views

Varnish and Apache Document Root

I've inherited a system with a Debian 8 with an Apache installed and multiple VirtualHosts. In my 000-default.conf file I've got /var/www/ as document root, not /var/www/html and I can't found ...
Jon Zangitu's user avatar
0 votes
1 answer
281 views

Questions about Varnish file storage engine

I have Varnish cache in front of some websites with the following storage engine configuration: Storage: file Size: 130GB The server where it is installed has the following configuration: RAM: 7.5 ...
Joseph Paz Aliaga's user avatar
2 votes
2 answers
1k views

Varnish and HTTPS with Apache without Ngnix, Pound, HAProxy

Whenever I search for implementation of Apache, HTTPS and Varnish I always find tutorials about terminating SSL-requests through Ngnix, Pound, HAProxy like, for example, https://www.smashingmagazine....
Nick's user avatar
  • 205
0 votes
1 answer
569 views

Redirect from HTTPS to HTTP in nginx as a reverse_proxy

I have an edge server in which a varnish and an Nginx are installed on it. I use Nginx as a reverse_proxy for SSL termination for HTTPS traffic and also forwarding HTTP traffic. Both traffics are ...
Sinai's user avatar
  • 213
0 votes
1 answer
233 views

Warm the cache but don’t raise too many DNS requests

I have a website with over a million pages served from a varnish cache that sits behind nginx and every day I run a cron to invalidate all the pages (Don’t ask me why, it's complicated…). The website ...
Quintin Par's user avatar
  • 4,443
0 votes
1 answer
2k views

Tracking cause of 503 errors for certain IP addresses

An outside IP address is getting access blocked (though a few rare requests do get through from the IP address) with 503 errors to websites on my Apache2 webserver on a Debian machine. I have ...
StevieD's user avatar
  • 552
1 vote
1 answer
2k views

Is there a better way to analyze Varnish hit rate

I currently analyze varnish hit rate like this While this is good, a major part of the request the server services is non-cacheable. This brings down the hit rate drastically. How can I modify this ...
Quintin Par's user avatar
  • 4,443
1 vote
1 answer
1k views

varnish.log pushing 300G

I inherited a server recently and saw that there is varnish.log file in /var/log/varnish that is currently pushing upwards of 300G file size. I looks to me like a feed of the data I get when I run ...
user avatar
2 votes
3 answers
3k views

how can I read old varnish logs?

In /var/log/varnish/ I have some old varnish logs, produced by varnishlog which, due to logrotated, are now in gz format: -rw-r--r-- 1 varnishlog varnish 143068514 Aug 10 23:59 varnish.log.2017-08-...
cherouvim's user avatar
  • 824
0 votes
1 answer
275 views

varnish throwing gzip error

I get this error when running: varnishlog -b -q 'FetchError' - ObjHeader X-Frame-Options: SAMEORIGIN - ObjHeader Vary: Accept-Encoding - ObjHeader Content-Type: text/html; ...
matpol's user avatar
  • 318
0 votes
0 answers
201 views

Redirect loop with internal elastic load balancer (between varnish & www node)

I've got a website & the scheme is the following: Internet<-->ExternalELB<-->Varnish<-->WWWnode I'm trying to setup a second InternalELB so the scheme would change to: Internet<-->...
GTXBxaKgCANmT9D9's user avatar
-2 votes
1 answer
202 views

How to use iptables on varnish cache server to access only by one network and backend server

Hi i want to allow only one network say 10.10.0.0 to access my varnish edge cache server at 192.168.1.10:80 port also block other 80 port request but the problem is cache server points to a origin ...
Leo's user avatar
  • 11
0 votes
1 answer
103 views

Caching setup for my webserver (varnish, bcache)

I have a couple of questions about caching: Basically I have a server which serves images/video for a website hosted elsewhere. It runs Caddy (but that is not important). I have a 8TB ZFS (HDD) pool ...
Zen Savona's user avatar
0 votes
1 answer
3k views

Issue with ERR_EMPTY_RESPONSE on Azure VM using Nginx and Varnish

Intro -- the scenario I am relatively new to linux server configuration, and with Microsoft Azure cloud services. I have a VM sep up with a stack consisting of Nginx, Varnish, PHP7-FPM, MariaDB, ...
inspirednz's user avatar
0 votes
1 answer
539 views

Varnish 5 seconds delay

I have a strange problem with varnish, it's in front of an API and it's caching the whole responses. It mostly works fine, but from time to time a request will take 5 seconds (or rarely 10 seconds, or ...
Ulrar's user avatar
  • 397
0 votes
1 answer
1k views

Varnish ban query string

I'm trying to setup ban in Varnish 4. I have this in vcl_recv : ban("req.http.host == " +req.http.host+" && req.url ~ "+req.url); return(synth(200, "Ban added")); When I make a ...
Ulrar's user avatar
  • 397
0 votes
1 answer
2k views

Varnish does not cache .js/.css/.HTML for some wordpress sites

I am using Nginx as an SSL terminator in front of varnish. Backends are litespeed. I have two wordpress sites in which both of them uses HTTPS protocol. I have a Haproxy in front of my infrastructure ...
Sinai's user avatar
  • 213
0 votes
3 answers
207 views

Varnish as a simple forwarding web server

I have a low load website having on the average 1000 visitors per day. It is roughly estimated to reach to 10,000 (or even 20K) users on daily basis in 6 months or so. But I still consider that to be ...
hB0's user avatar
  • 111
1 vote
1 answer
421 views

varnish redirect to home web dir

I have a reverse proxy I'm setting up as an office dashboard with a couple of web hosts behind it. Ultimately I want: dashboard.company/nagios to go to nagios.company/ dashboard.company/grafana to ...
Ethan Shrago's user avatar
0 votes
1 answer
2k views

Error too many redirects in nginx + varnish+ SSL

I have a clustered infrastructure. I use nginx for SSL termination in front of varnish. The backends of varnish are apache web servers.and I also have a haproxy as a load balancer which sends HTTPS ...
Sinai's user avatar
  • 213
1 vote
2 answers
2k views

Keep the host name requested by the client to pass to remote backend when using Varnish cache and proxy pass

I am having some trouble configuring Varnish and the online documentation is not very clear (for me at least). I currently have Varnish cache setup on a Ubuntu server. I tested varnish with a local ...
David_kav's user avatar
0 votes
0 answers
1k views

Why is Varnish not probing the backend server?

I have two backends for a Varnish configuration. The first backend works fine, the second backend seems to be completely ignored by Varnish. It seems that the .probe on the second backend is ignored ...
sbrattla's user avatar
  • 1,600
0 votes
1 answer
5k views

NGINX Varnish SSL - too many redirects

Anytime I try to add a redirect in an NGINX config file I get this error so I basically avoid it, this is not really the way to proceed so I need to figure out why the heck I cant add redirects... It ...
Kravitz's user avatar
0 votes
1 answer
1k views

Does any varnish using directors.hash() and hash.backend() always choose the same backend?

I have 2 varnish, each of them having 2 backends (same varnish versions -v4.x- and configuration file). Incoming client connections are randomly distributed to any available varnish. I need clients ...
Totor's user avatar
  • 2,996
0 votes
1 answer
1k views

PHPmyadmin doesn't work on document root after successful Varnish install

Last week I installed Varnish and my websites are now working fine with it - I can navigate and change them without error. Back when I installed it, I putted Varnish on port 80 and moved Apache to ...
user415736's user avatar
1 vote
1 answer
2k views

Varnish cache headers to browser

Is it possible for varnish to send the "Cache-Control: no-cache, no-store, must-revalidate" cache control response to browser, while varnish caches the response. Scenario is like this. Backend sends ...
Isudoers's user avatar
1 vote
1 answer
2k views

Varnish maximum "set beresp.ttl" value

I'm trying to set 100 days = 144000m ttl for varnish cache for a certain page but I observed Varnish is purging cached pages. So question what is the maximum ttl that I can set if ((req.url ~ "\.(...
goodthebest's user avatar
0 votes
0 answers
960 views

How to figure out the optimum settings for Apache 2.4 PHP-FPM mpm_worker?

I'm struggling to figure out the correct settings for my Ubuntu server. It has 16 CPUs and 48GB of Ram. However, it seems to be taking a while to respond to requests. Recently, I switched to PHP-FPM ...
Wayne's user avatar
  • 73
0 votes
1 answer
843 views

Why would one Virtual Host be slower than the rest?

I've got multiple virtual hosts on my Ubuntu server. I am running Apache 2.4 & mod_php. At the moment, one website is receiving a lot of traffic - and it is taking time to respond (6+ seconds at ...
Wayne's user avatar
  • 73
0 votes
1 answer
987 views

How to log the name of backend that responded a request

I'm using varnishncsa to log requests that are taking to long to be answered on my backend servers using the following command: varnishncsa -F '%t "%r" %s %T' | awk '$7 > 10 {print}' I was trying ...
hvelarde's user avatar
  • 133
1 vote
2 answers
5k views

Nginx, Varnish 4.1 Backend fetch failed

I can access the site via https and the admin section., but can't access non https/guest or anything that should be cached. varnishadm -S /etc/varnish/secret -T localhost:6082 debug.health ...
Rodz's user avatar
  • 11
2 votes
1 answer
2k views

Varnish unsetting all except last x-forwarded-for IP address... bug?

While trying to figure out why our Varnish 4.1 install (on CentOS7 via the varnish-cache.org repo) was not following vcl rules set out to log the client IP address in an X-Forwarded-For header (see: ...
dcmbrown's user avatar
  • 315
0 votes
2 answers
1k views

SSL Hitch massive performance decrease

I'm testing around with loader.io and noticed SSL (termination) in front of varnish serves very badly. My Digital Ocean graph seems to show Disk I/O maxed at 1.21MB/s (isn't this incredibly low? My ...
Bram z's user avatar
  • 113
3 votes
1 answer
6k views

Redirect HTTP to HTTPS using Varnish 4.1

I have been trying to config the redirection of www HTTP to non-www HTTPS with Varnish 4.1, Nginx, PHP7.0.15, but it's not successful. Really appreciate your insight on the issue: The purpose: to ...
greentealeaf's user avatar
0 votes
1 answer
296 views

Why Varnish does not have any effect in sense of server response time with my nginx upstream and nodejs app?

I saw some php websites after putting Varnish in front of them responding in 0.2 seconds. Now I have: Nginx upstream Varnish in front of 1) Two app servers with nodejs My Varnish setup is standard: ...
pregmatch's user avatar
  • 303
0 votes
0 answers
565 views

How can I ensure varnish always has a child process running?

Now and again I encounter a problem on a varnish box which results in varnish's child process dying. It usually looks something along the lines of: Feb 26 17:09:45 webstar varnishd[9775]: Child (...
lucas's user avatar
  • 200
1 vote
1 answer
173 views

Varnish load balancing - does all data flow through varnish making it a bottleneck

When using varnish as a load balancing server, does all data flow through the single varnish load balancer thus bottlenecked by upload speed on well optimized websites serving thousands concurrent ...
Bram z's user avatar
  • 113

1 2 3
4
5
19