Questions tagged [varnish]
Varnish is a high-performance reverse proxy and load-balancer package for Linux/Unix systems.
940
questions
2
votes
3
answers
5k
views
Port number being added to WordPress admin after Varnish install
I added Varnish in front of nginx. When I try to login to WordPress, I go to domain.com/wp-admin but I'm now redirected to domain.com:8080/wp-admin. I can manually remove the port and the admin side ...
0
votes
3
answers
491
views
Force WWW with Varnish and nginx
I'm trying to figure out how to force WWW in varnish for only one domain. I saw this answer to remove WWW but I don't know how to translate it to force it.
Edit: To clarify, my nginx config was ...
4
votes
1
answer
9k
views
How to set Varnish so that it doesn't cache a specific URL with a query string?
Server setup: Ubuntu 12.10, Varnish 3.0.2, Nginx 1.3.14, with a WordPress 3.5.1 install.
We are using the "Random Redirect" plugin which shows a random blog post at the URL http://example.com/?random
...
3
votes
2
answers
1k
views
Varnish - Cookie
I have the following situation:
On my site, javascript sets a cookie that contains relevant information for generating the markup.
I therefore want Varnish to cache each page separately for each ...
5
votes
1
answer
5k
views
Varnish fails to start. Running VCC-compiler failed without a compiler error
EDIT: System ran out of disk space so the compiler couldnt create the files. The output of varnishd doesnt tell you this.
Always check your disk quota if you get weird errors with no obvious reason :)
...
2
votes
1
answer
779
views
Varnish load-balance with per-server request rewriting
I'm trying to load-balance a 3rd-party web application with Varnish, and this 3rd-party application requires the 'real' server name (it appears to connect to this server by name in the background (and ...
2
votes
1
answer
3k
views
mod_rpaf not recognising RPAFheader setting
After installing mod_rpaf, I set my config file (/etc/apache2/mods-available/rpaf.conf) as follows:
<IfModule mod_rpaf.c>
RPAFenable On
RPAFsethostname On
RPAFproxy_ips 127.0.0.1
...
1
vote
1
answer
1k
views
nginx, apache http authentication
I have an nginx reverse proxy server which feeds into a varnish cache with an apache backend.
The php is running as a fastcgi process started from apache.
I was attempting to get some php software ...
0
votes
1
answer
3k
views
Varnish: Exclude section of page
Is there any way to exclude some webpage parts from cache? For example, I have Recent Additions block on my homepage which gets refreshed after every 15mins.
I know there is something like ESI ...
0
votes
1
answer
2k
views
Error 503 Service Unavailable Varnish
So I setup a new cloud based instance with Ubuntu 12.04, with nginx, php5-fpm and varnish.
Before I installed and configured Varnish, the website worked fine, virtual hosts worked. After setting up ...
4
votes
1
answer
2k
views
does varnish config include statement support wildcards?
After googling and briefly browsing varnish docs, I could not find a reference to this. Can I do for example the following in varnish vcl?
include sites-enabled/*.vcl
1
vote
1
answer
2k
views
truncated headers from varnish configuration file
I need help with Varnish, I have a varnish configuration file as default.vcl.
I can see from the output of varnishstat that hit ratio is quite high.
I've also checked varnishtop -i txurl to see ...
3
votes
1
answer
1k
views
How can I log timestamps with Varnish health probes?
I'm using Varnish 3.0.3 on RHEL 6 as a caching load balancer in front of several Apache web servers and want to keep a log of when Varnish sees the back-ends change from healthy to sick and back again....
1
vote
1
answer
470
views
Reliably test ColdFusion server health
The Background
We're running a Varnish cache server in front of a CF/Apache2 backend server. The varnish box runs a healthcheck probe every two seconds as follows:
probe healthcheck {
.url = ...
1
vote
3
answers
419
views
nginx + php-fpm + varnish + ssl
I have a social networking site and because of that we want to run ssl all the time. does this defeat the purpose of using any type of cache system for even static content since everything will be ssl?...
1
vote
2
answers
847
views
Varnish not passing user IP correctly to MediaWiki
I'm running a setup with Nginx, FastCGI, APC, Memcache and Varnish to host a MediaWiki installation. I'm having some issues with recent changes showing up as coming from 127.0.0.1 in the case of ...
0
votes
1
answer
420
views
varnish and SSL
Can you use varnish with SSL?
What I currently have. Can I get SSL in here?
backend default {
.host = "127.0.0.1";
.port = "8080";
}
#
# Below is a commented-out copy of the default VCL logic. ...
1
vote
1
answer
3k
views
Setup a shared Varnish server
Having set up and configured Varnish Cache to handle caching for a single site, I'm looking into expanding the service to cover multiple sites running across multiple webservers, each in turn running ...
0
votes
1
answer
3k
views
Varnish not showing custom headers
In my Varnish 3 configuration (default.vcl) I configured the following to pass along information via the response headers:
sub vcl_deliver {
if (obj.hits > 0) {
set resp.http.X-Cache = ...
-1
votes
1
answer
264
views
How does Varnish handle expiration [closed]
I've been using shared hosting up until recently before switching to a normal VPS for learning. Currently my server only run wordpress and forum on top nginx + mysql and nothing else. I've read ...
-1
votes
1
answer
571
views
Can I use Varnish to front 2 different services from different servers on 1 domain? [closed]
I've been futzing around with getting this set up however I don't know if Varnish supports what I am trying to do:
I have a server (ec2) thats running Nginx/Magento for ecommerce (www.domain/)
On ...
2
votes
1
answer
1k
views
Varnish saintmode gives 503 instead of backend's custom 500 page
I don't understand Varnish's behavior in this instance:
Say I have one page on a site that begins to generate 500 errors (and the site has a good custom 500 screen, but that's not completely relevant)...
0
votes
1
answer
891
views
Ideal Varnish & nginx setup to ensure cache consistency across multiple instances
Looking for the ideal setup involving nginx as our top layer load balancer that distributes load across multiple Varnish instances.
What is the best way to distribute this load? One way would be to ...
1
vote
1
answer
615
views
Get varnish statistics for each backend
I'm running an instance of Varnish with load-balancing to several backends.
I want to get the statistics of the cache hits, cache misses, hit for pass for each backend and not the total if the server ...
0
votes
1
answer
858
views
Matching req.http.Host in Varnish via Regex vs Standard Operators
I am able to do either of the following:
Host match using standard operators:
if (req.http.Host == "domain1.com" || req.http.Host == "domain2.com") { ... }
Host match via regex:
if (req.http.Host ~...
0
votes
2
answers
941
views
Varnish not loading anything in "images" folder
I just setup a stock varnish install on debian and I am testing it out. It seems to work fine, except its not loading anything in the "/images" folder.
Works over Lighttpd:
example.com/images/...
1
vote
3
answers
7k
views
Prevent users to access to website using port 8080 (apache) when using Varnish (on port 80)
My configuration is very simple :
To avoid duplicate content, I want to prevent user to go on my website by hitting directly apache (which is running on port 8080).
I have setup a Varnish server ...
1
vote
1
answer
1k
views
Varnish 3 performs gunzip even though entire pipeline is gzipped
I'm refactoring my Varnish VCL and can't figure out this one thing.
Varnish 3.0 natively supports gzipped content, and it essentially seems to do the right thing. See also: https://stackoverflow.com/...
1
vote
2
answers
16k
views
List contents of varnish cache
Is there a way to list the contents of the varnish cache storage? Also, it would be nice to somehow list the most frequent cache hits.
I found a way to see the most frequent cache misses by listing ...
1
vote
1
answer
530
views
HAProxy+Varnish configuration advice
I am using HAProxy to load balance a bunch of PHP servers and want to introduce Varnish in the scene now. HAP sends request to Varnish iff app-login cookie is not available, Varnish doesnt have to do ...
2
votes
1
answer
6k
views
Caching similar to Varnish on Windows Server [closed]
I'm looking for a caching for IIS similar to the Varnish.. But as Varnish is not recommended on Windows, I would like to have suggestions as what are the other alternatives that can be used for ...
1
vote
1
answer
725
views
Why is Varnish not caching my index page properly?
I have a Varnish set up in front of Apache 2 on Ubuntu 11.10. I'm using this VCL file:
backend default {
.host = "127.0.0.1";
.port = "8080";
}
sub vcl_recv {
if (req.url ~ "^/web") {
...
0
votes
3
answers
2k
views
Unable to use vmod std in Varnish 3.0.0 under Ubuntu 11.10
I want to import std; and do some std.syslog. However, when I restart varnish, the VCC compiler fails:
$ sudo service varnish restart
* Stopping HTTP accelerator varnishd ...
1
vote
1
answer
151
views
varnish3.0.2 rewrite the url howto
I have lots directories which have the same image "_a.png",like these:
/data/images/{a,b,c,d}
Because this, the varnish cache multiple copies.
Now I want to rewrite the urls to one,like this:
if (...
8
votes
2
answers
3k
views
Varnish running out of open ports, lots of SYN_SENT connections
Recently we've been experiencing issues with our Varnish (3x) -> Apache (3x) setup, resulting in a huge spike in SYN_SENT connections.
The spike itself is due to the amount of new traffic hitting the ...
1
vote
0
answers
214
views
Is Snort able to efficiently demux and log large HTTP POST requests?
I'm trying to debug some failed HTTP POST requests containing large file uploads (~500 MB). The end-user is receiving strange HTTP responses that are not being logged in either varnish's varnishncsa ...
3
votes
1
answer
66
views
Using a 3rd server for caching database and static content
So, I just "won" a free year for a basic VPS with 5GB storage and 256MB ram and I thought that the best thing I could do with it is to separate the memcache service from each of my other 2 servers and ...
7
votes
2
answers
5k
views
reverse proxy that caches post requests
I understand that varnish caches "GET" and "HEAD" requests by default.
My backend servers fail when I do a get request that is too long, so I made them respond to POST instead of GET. This works ...
3
votes
1
answer
96
views
varnish delete least requested files
I see that varnish can be configured to set -smalloc or -sfile with a certain size.
I want to set a file cache of 1G such that least requested files are deleted first when cache is full. Is this ...
1
vote
1
answer
224
views
varnish 503s when accessing backend
I have two backends that I'm serving on my web server, both of them are remotely hosted by third party companies. One of them is a support portal page, which is passing cookies and I suspect is ...
1
vote
0
answers
537
views
UFW blocks SSL connections Varnish/Apache2 on Ubuntu 12.04
I have installed Virtualmin on a Ubuntu 12.04 server and I'm using LAMP stack with Varnish (:80) in front of Apache (:8000). However, I cannot access https when UFW is enabled. When I disable UFW, all ...
1
vote
2
answers
2k
views
duplicate cache pages: Varnish
Recently we have configured Varnish on our server, it was successfully setup but we noticed that if we open any page in multiple browsers, the Varnish send request to Apache not matter page is cached ...
1
vote
1
answer
256
views
What does the float number indicate when using varnishtop?
I have Varnish running and I wanted to see what http response codes commonly occur. I used:
varnishtop -i TxStatus
However, I am struggling to work out what the numbers on the left mean? Is it ...
0
votes
1
answer
495
views
IP bases access control list script
I would like to setup ACL (python script or any ready made Centos compatible scipt) & limit rate for all IP addresses, who are hitting the site very frequently. For example crawlers, bots (except ...
4
votes
2
answers
10k
views
Auto restart server if virtual memory is too low
There are quite number of software running on my server: httpd, varnish, mysql, memcache, java..
Each of them is using a part of the virtual memory and varnish was configured to be allocated 3GB of ...
1
vote
2
answers
1k
views
Caching without file extensions
I'm trying to use Varnish to show the non-logged in users a cached version of my website.
I'm able to perfectly detect if the user is logged in or out, but I can't cache pages without extensions.
...
2
votes
1
answer
5k
views
Continuous segmentation faults (code 11) with nginx and php-fpm
I'm running a CentOS 6 64bit server with 1.2 GHz CPU and 2.4 GB RAM. The server runs nginx and php-fpm with the APC extension and also mysql.
A couple of weeks ago the server starting continuously ...
2
votes
1
answer
2k
views
Apache 403 after configuring varnish
I just don't know where else to look and what else to do. I keep getting a 403 error on all my vhosts after setting varnish 3.0
Apacher log:
[error] [client 127.0.0.1] client denied by server ...
0
votes
1
answer
444
views
Caching all files in varnish
I want my varnish servers to cache all files. At backend there is lighttpd hosting only static files, and there is an md5 in the url in case of file change, ex. /gfx/Bird....
2
votes
0
answers
710
views
Nginx > Varnish > Gunicorn Error Too many Redirections
I have the following config:
Nginx > Varnish > Gunicorn > Django
I want to cache 2 versions of same site (mobile & web) with Varnish.
Gunicorn :
WEB: gunicorn_django --bind 127.0.0.1:8181
...