Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [varnish]

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

0
votes
0answers
19 views

Error 503 Back-end fetch failed

I have some problem with the nginx varnish configuration. When I connect https://example.com I get these messages: Error 503 Backend fetch failed Backend fetch failed I'm using hitch for ...
-2
votes
0answers
16 views

Nginx Varnish Configuration issue

I'm trying to install varnish with ssl from this link: https://www.linode.com/docs/websites/varnish/use-varnish-and-nginx-to-serve-wordpress-over-ssl-and-http-on-debian-8/ I did everything like post ...
0
votes
1answer
19 views

Varnish greedy buffering

I have a setup with nginx proxy (ssl) to varnish (5.2) to apache on a debian linux. varnish passing response without buffering to nginx (not buffering either) sub vcl_backend_response { if ( std....
0
votes
1answer
53 views

Trying to configure hitch to see/use SSL certificate (as front end to varnish)

First, please let me start this with a "warning" that I'm a newbie with this and am trying to learn on my own. However, my frustrations are mounting and I'm almost ready to completely abandon SSL. (...
0
votes
0answers
20 views

Automatically reload cached objects after varnish xkey.softpurge()

I need to automatically refresh/fetch again objects I invalidated with xkey.softpurge() so that varnish always has a cached version in memory. How is this possible? I am doing a restart in vcl_purge ...
0
votes
1answer
43 views

Large Varnish VCL does not load

I'm using Varnish ACLs for blocking unwanted clients by IP and as the blocklist/ACL has grown the compile time of the VCL has increased a lot. The other day I added another 25K IPs to block and ...
1
vote
2answers
11 views

How to add GET-paramter causing Varnish serving uncached page

I want to add a paramter to some URL that allows me to server a page uncache. So something like https://example.org/foo/baa?uncached should be server by the application servers where as https://...
0
votes
0answers
9 views

Is there a way to ask varnish to cache objects after n number of times of request?

I am having trouble with the varnish setup at our site, where a certain crawler bot hits with some old images indexes and hence our varnish trying to get response expires all the caches and put so ...
0
votes
1answer
75 views

I think Varnish is dropping my query string parameters

Our WordPress site has multiple views for every page and post depending on whether or not a specific query string is used. For example, if visited example.com/blog-post-with-chart (a page which ...
0
votes
1answer
54 views

Nginx, SSL and Varnish returning ERR_TOO_MANY_REDIRECTS

I'm trying to setup a Nginx server with Lets Encrypt SSL and Varnish for cacheing but I've hit a brick wall. For some reason the website just keeps returning ERR_TOO_MANY_REDIRECTS and I'm can't track ...
0
votes
0answers
28 views

cannot access phpmyadmin through varnish 6 on example.com/animalute/_pa_ad

I need to use different backends for different request urls and I've got a problem when I'm trying to access phpmyadmin. /* SET THE HOST AND PORT OF WORDPRESS * *************************************...
0
votes
1answer
34 views

wordpress ERR_TOO_MANY_REDIRECTS through varnish, but not through apache

I'm having this weird problem with a varnish-wordpress setup. I get TOO_MANY_REDIRECTS when I try to divert traffic through varnish, but if I configure apache directly with a vhost listening on 443, ...
0
votes
0answers
19 views

varnish 4.0 block all ip addresses exept for whitelisted

We have a load balancer for our varnish servers, and only that should be allowed to send traffic to varnish. Is there a way to block all ip addresses except for the 2 ip addresses from the load ...
1
vote
1answer
59 views

Allow location in NGINX based on IP - request comes from Varnish

If Varnish is set as the default Cache in front of my NGINX backend, how can I check in the NGINX backend for the clients original IP and make a decision based on that? I want to allow a certain ...
0
votes
1answer
41 views

Varnish + NGINX: Use Wordpress in domain.tld/blog as separate Backend server not in location block

I want to serve a wordpress NGINX backend everytime the user visits www.domain.tld/blog. I know I can use different backends with Varnish like this: sub vcl_recv { if (req.url ~ "^/blog/") { ...
0
votes
1answer
42 views

HAproxy + Varnish

As seen on the picture below, this is my current planned setup, I need to tell HAproxy to send users to the Varnish, if HAproxy detects a cache-miss, or dynamic/pseudo-dynamic content, it will send ...
0
votes
2answers
156 views

Does it make sense to use both Varnish AND Browser caching?

I'm a bit confused about what the best practice is when using Varnish: I saw many sites where I know they were using Varnish, which had Cache-Control: no-store, no-cache, must-revalidate HTTP headers ...
0
votes
1answer
77 views

Unable to remove Server HTTP header with Varnish 5

I have the following vcl_deliver subroutine: sub vcl_deliver { # Remove some HTTP-headers: unset resp.http.Server; unset resp.http.X-Varnish; unset resp.http.Via; unset resp.http.X-Cacheable; ...
6
votes
3answers
501 views

Does it makes sense from a security perspective to remove the Server HTTP header?

I'm using Varnish and I'm not quite sure if I should also remove the Server: nginx HTTP header. Why do someone needs to know that I'm using NGINX? Is it ok to remove this HTTP header from the response ...
1
vote
1answer
55 views

log 5xx errors in varnishlog, but no higher than “599”

Having searched on the internet I found this solution to identify 5xx status codes: varnishlog -q "RespStatus >=500" The problem with this is that it also includes internal codes such as 750 or ...
0
votes
0answers
42 views

Forwarded IP by varnish shows up twice in apache logs

If I use the following configuration in varnish, if (req.restarts == 0) { if (req.http.x-forwarded-for) { set req.http.x-forwarded-for = req.http.x-forwarded-for + ", " + client.ip; ...
0
votes
0answers
130 views

Is it worth using Nginx as an SSL/TLS terminator in front of Varnish, rather than just Nginx itself as a cache?

First off, as I understand it, Varnish Cache is only a HTTP accelerator, and thus does not support client-side or server-side (backend) connections over HTTPS, despite the existence of this whitepaper....
1
vote
1answer
529 views

How to Varnish over https with Apache?

I read few times that nginx is possibly faster and there are other SSL terminators Varnish and HTTPS with Apache without Ngnix, Pound, HAProxy (can't comment yet) Anybody successfully setup varnish ...
0
votes
1answer
205 views

apache reverse proxy with varnish cache configuration

I have an Apache reverse proxy that is serving content from another site over the Internet. There is an ssl cert between the user and the proxy and between the proxy and the origin server. Apache ...
0
votes
1answer
212 views

Nginx tries to run on port 80 but the configs have been removed

I have a server that runs nginx with varnish. I cannot run nginx and varnish at the same time as the they are both trying to listen on port 80. nginx is configured to listen on port 8080 ...
0
votes
1answer
32 views

Varnish with apache 2 and multi vhost

I am looking to a guide about configure Varnish for my ubuntu server with apache 2. There is like 20 website (who are not using varnish and do not need it). Only one vhost (magento 2.X) need varnish....
0
votes
0answers
49 views

Can Varnish be used to setup a mirror cache server?

I currently use a single web server running PHP, nginx and MySQL for running a high traffic website (10+ million pageviews). We use our own backend and caching mechanism and loads are very low, even ...
1
vote
1answer
51 views

Varnish set upstream proxy for backend

backend default { .host = "external.site.com"; .port = "80"; } From the varnish server, I need to contact the backend via a proxy. How to add one? There is nothing like .proxy = ""; in the ...
0
votes
0answers
267 views

ubuntu 18.04 offers obsolete version of varnish in official repo

As you know, Ubuntu 18.04 was release less than 2 months ago. When I tried to install varnish from the official ubuntu repo, it offered version 5.2.1-1. However, on the varnish site it says that 5.2.1 ...
0
votes
1answer
158 views

How to add vary custom header

My application is changing the content based on user country code. Please find server request flow diagram. https request -> nginx handle the ssl termination -> varnish -> if not cacheed, get ...
1
vote
0answers
233 views

Magento 2 : X-Magento-Cache-Debug:MISS, over SSL, pages are not being cached by varnish

I have configure varnish with magento 2 with the reverse proxy in apache ubuntu. But, when I see at the headers, I always get the header MISS from the host. So, page is not being cached by the ...
0
votes
1answer
47 views

Varnish 3 , block or slow down users based on IP Address traffic

Varnish version 3.0.7. Is it possible to slow down connections if you detect a lot of traffic/connections from a particular IP address ? Any suggestions on how to do that? We also have haproxy so we ...
0
votes
1answer
195 views

Varnish https caching in apache?

Is it possible to cache HTTPS traffic with Varnish in apache ? I have done http caching with varnish and it works fine. But my website is in HTTPS. So can any body please confirm it ? Thank you. :-)...
1
vote
0answers
274 views

Apache SSL Varnish ERR_TOO_MANY_REDIRECTS

I run a Magento store on a Ubuntu 16.04 VPS using Apache/2.4.18 and varnish, and now I wanted to add SSL (lets-encrypt) in the mix. And apart from other obstacles (static content not loading on HTTPS ...
2
votes
2answers
246 views

Deleting key in Nginx cache and Backend database in the same request

I am using the open source Nginx as the web server with Proxy_cache. I have a unique usecase of deleting the key in cache as well as pass the request to the backend servers to delete the key in DB ...
0
votes
0answers
35 views

cannot configure varnish 4 with systemd on ubuntu 16.04

I'm trying to set up a systemd script for varnish 4.1 I've installed it on Ubuntu 16.04 from source. If I run it manually, it works just fine, but within this systemd script, it won't work: [Unit] ...
0
votes
2answers
105 views

How to cache some requests based on request rate?

We have some super heavy APIs, say /api/heavy, it will slow down our system when peak time, we did some benchmark, if the simultaneous request count is greater than 200, the system becomes slow, and ...
0
votes
1answer
147 views

Is it the right way to configure nginx to prepare it for varnish-cache?

Context I used a bitnami prepackage image to started a nginx+wordpress site on Google Compute. I want to enable varnish-cache on this server. A varnish 4.x package is already preinstalled but not ...
0
votes
1answer
2k views

Error 503 Backend fetch failed Guru Meditation: XID: 45654 Varnish cache server in magento2

we are using MAgento 2.1 and elastic suite ,rediss cache and varnish cache 4 so we have 60 K products in our site and recently we updated attribute in magento2 admin from that day onwords we are ...
2
votes
1answer
89 views

Varnish stoped working and dies after start OK

EDIT 11/03/2018 I ran: varnishd -f /etc/sysconfig/varnish I got: Unterminated string at (input Line 96 Pos 13) DAEMON_OPTS="-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \ ---------...
0
votes
1answer
129 views

Varnish in front of multiple servers with versioning

I've got Varnish in front of multiple webservers, I can run them as native to varnish or through upstream checks via nginx, but only static content is cached (no surprise), also respecting query ...
1
vote
0answers
246 views

Compound Varnish URL filtering with query params

I have a WordPress instance with Varnish in front in which I have blocked access to wp-login.php via VCL by using: sub vcl_recv { # block outside access to login if (req.url ~ "wp-admin" &...
0
votes
1answer
223 views

cannot start varnish - Running VCC-compiler failed acmetool.conf

I've got this weird error in Varnish 4 and I'm not sure how to interpret it. If I try to start varnish, it says: Error: Message from VCC-compiler: Expected an action, 'if', '{' or '}' ('/etc/varnish/...
0
votes
0answers
128 views

Varnish 4.1.9 used high memory

I have a few cache servers which are running varnish 4.0.5. I have dedicated 6GB of Ram to varnish on all servers. The Operating system is Centos6.9 and all servers have 8GB of total memory. I ...
0
votes
1answer
68 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 ...
0
votes
0answers
15 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. ...
0
votes
1answer
86 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. ...
1
vote
0answers
463 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 ...
0
votes
2answers
114 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 ...
0
votes
1answer
120 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 ...