Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm running a Cpanel VPS with 5 sites on it. I would like to use Varnish Cache one site only. Can anyone confirm this is possible?

http://www.varnish-cache.org/

share|improve this question
add comment

4 Answers 4

up vote 0 down vote accepted

There's a cPanel plugin for that: http://www.unixy.net/varnish

Cheers

Edit#0: @Chopper3. I was involved in beta testing but no compensation was involved.

Edit#1: @Praxis Micro, it costs ~$5/mo for non customers. It's definitely not free :). I'm still running on trial and I'm weighing my options (so far so good). The thing is it's much cheaper than Litespeed and is as fast. We'll see.

share|improve this answer
    
Is ther any reason I shouldn't assume this is spam and against our terms of use? please explain why this isn't spam or this message will be deleted. –  Chopper3 Mar 8 '11 at 14:56
    
@Chopper3, don't you think the link is topical? It covers: 1) Varnish 2) cPanel 3) It has the Varnish backend logic to make Varnish work with Apache+cPanel 4) Has a free trial (you could just get the config file and reuse it). No need to pay anything. But by all means, please delete the entry if you don't think this is relevant. –  Carl Mar 8 '11 at 16:24
    
It's totally relevant but are you connected to the organisation? –  Chopper3 Mar 8 '11 at 16:26
    
I assume it's only available to UNIXy customers? –  Praxis Micro Mar 9 '11 at 4:04
    
Thanks for coming back to me about this, I'll leave it as it is but please be aware that it originally looked like spam, consider that in the future. –  Chopper3 Mar 10 '11 at 10:53
show 1 more comment

Yes.

  • Install varnish(from EPEL)
  • Configure to listen new IP address, and proxy to your site
  • Check varnish(open http://NEWIP/)
  • Change DNS record to new IP
share|improve this answer
    
This works, but there is a way to install varnish on alive site without either changing IPs, DNS or Apache (see my answer). –  Coops Mar 3 '11 at 9:36
add comment

Yes, however if all your sites listen on the same IP you'll need to add a check for the specific site you want to cache, and allow all other traffic automatically through to Apache.

The way I normally setup varnish is to leave Apache on port 80, put varnish on, say, 8090 and use a iptables PREROUTING route to redirect incoming traffic through varnish first. That way Apache (and your control panel) don't need any changes.

share|improve this answer
add comment

Praxis for whm/cpanel definitely Unixy varnish plugin is a good start - just beware of differences between unixy varnish implementation of varnish caching compared to varnish' default method of caching - differences outlined at http://vbtechsupport.com/33/ - very long read!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.