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.

We have a website and it's current architecture is as follows:

There's squid in the front which caches images. Then there is apache httpd with mod_rewrite enabled. httpd then talks to apache tomcat(with mod_jk) for dynamic requests and servers static stuff like js,css on it's own. Apache httpd rewrites clean urls to raw ones(with ugly url params) that tomcat deals with. There are over 100 rewrite rules in the mod_rewrite config. We also have certain php stuff that we hacked together to work with facebook. the php files are served by apache, but the load is significantly less.

So the goal is to able to cache static files(js,css,images) aggressively and give the dynamic stuff directly to tomcat. We need url rewriting(that probably can be done in tomcat itself), gzip/deflate support as well as support for php.

So, given our needs, can a caching server like squid/varnish be placed directly in front of tomcat to make this work or Would we need a web server like nginx/lighttpd in between because we need php ?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

why not use apache/lighttpd as a proxy/caching server and php interpreter at the same time?

lighttpd as caching proxy: http://forum.lighttpd.net/topic/4845

apache as caching proxy: http://httpd.apache.org/docs/2.2/caching.html

share|improve this answer

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.