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.

Just wondering if it is possible to have nginx, apc, memcached, and varnish all running together. i am currently running on a dreamhost private virtual server, not that it matters. any input would be greatly appreciated.

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

Yes, it is. It will get a little crowded and maybe memcached will not have much to do but it is possible.

 Varnish -> Nginx (php, apc, fastcgi probably) -> memcached ?

is it that you are intending?

share|improve this answer
add comment

We currently do this in our environment. Specifically:

nginx -> varnish -> apache (with memcached & apc installed). We do this on a RHEL5 box (64bit).

  • nginx runs on port 80 and acts as a proxy for varnish
  • varnish runs on another internal port which acts as a reverse proxy for apache
  • apache is running on another internal port

We added the nginx layer mainly to provide gzip compression on the outgoing requests. It works really well.

One tricky part is keeping the real IP of the initial client all the way down to the apache layer. We achieved this by implementing some custom headers in Varnish's VCL

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.