Questions tagged [varnishncsa]
14 questions
3
votes
2 answers
How to drop varnishncsa log if req.url matches
I've got a few load balancers that all perform health checks on a number of varnish instances. The health check on the varnish side consists of matching the request method and URL to return a 200 response.
if (req.method == "GET" && req.url ==…

Stephen Mahood
- 61
- 2
3
votes
1 answer
Varnish, outputting ReqEnd using standard out
Is it possible to output ReqEnd using std.log in VCL? I would like to use ReqEnd in varnishncsa logging.

Justin Hourigan
- 345
- 1
- 9
2
votes
1 answer
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: Varnish 4 logging proxy/load balancer instead of…

dcmbrown
- 305
- 1
- 3
- 12
2
votes
1 answer
varnishncsa does not show any output
I have varnsih setup on my RHEL6.x. While the varnish, varnishlog and varnishstats show proper data varnisncsa does not log any data even when run without any options defined. I have lsofed all the process and ensured that they are reading the…

nashrafeeq
- 255
- 1
- 3
- 12
1
vote
1 answer
Varnishncsa for Varnish 4 split log by Vhost
In the varnish 3, varnishncsa can support -m option (-m tag:regex only list records where tag matches regex. Multiple -m options are AND-ed together. ). After upgraded to varnish 4, I cannot find the -m option in varnish 4. Is it any easy way to…

tomli
- 21
- 5
1
vote
1 answer
Serve contents based on language with Varnish
My website has multiple languages. English is default language with url:
http://domain.com/ (http://domain.com/en).
When users want to use different language, they will click on the language button. For example, They want to switch to…

Kevin Nguyen
- 189
- 1
- 2
- 8
1
vote
2 answers
Logging of POST requests, cookies and XID in varnish (varnishncsa)
I would like to include following information in my varnishncsa logs (I need to relate some issues with specific users).
content of post requests
cookie with full content
XID
After reading…

bluszcz
- 409
- 1
- 6
- 16
0
votes
2 answers
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
…

Riccardo Grassini
- 3
- 1
- 4
0
votes
1 answer
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 to add information on the backend name but this is…

hvelarde
- 133
- 6
0
votes
1 answer
Varnish ignoring a backend
I have varnish setup with 2 backend servers with a round-robin director.
The 2 backends are showing up in varnishstat and varnishadm as healthy.
varnishadm output:
Backend name Admin Probe
boot.app1 probe…

Stephen Mahood
- 61
- 2
0
votes
0 answers
Varnish won't start on reboot
I have varnish 4.1.2 installed, it starts fine from the command line but won't start when rebooting the server.
The syslog shows that the address is already in use (port 8080). There's nothing else installed on this server, it's a dedicated varnish…

Stephen Mahood
- 61
- 2
0
votes
1 answer
What does this block of varnish code do?
I have this code in varnish config and not sure what it do!
This config will cache or not my client requests? what is wrong with it?
sub vcl_backend_response {
if (beresp.status != 200) {
return (pass);
}
set…

Morteza
- 3
- 2
0
votes
1 answer
How to bypass varnish cache based on specific header
I've been working on this since 2 days ago, but no luck.
So, basically, I want to bypass the varnish cache for a specific incoming request URL.
I've defined this rule:
sub vcl_recv {
if (req.url ~ "/en/reading-books/") { return(pass); }
}
But…

Budianto IP
- 141
- 6
0
votes
1 answer
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 raw -i Backend_health
0 Backend_health - default…

Major Kuprich
- 13
- 5