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've seen a lot of discussion on the best way to use Apache as a proxy (either mod_proxy or mod_jk) with Glassfish (and other Java application servers), but I haven't seen anybody really explain why.

My setup right now is a single VPS running Ubuntu Server with Glassfish accepting HTTP requests on port 8080 (iptables forwards port 80 requests to port 8080 so I don't have to run Glassfish as root). I run a few small websites.

My site is divided into two main parts: static and dynamic. They are each on a separate subdomain. It would be easy to handle the static content with Apache (or another web server) and then use Apache as a proxy for the dynamic content, but is there any reason to do that?

If I were to use Apache, it would ideally have to run in less than 100 MB of memory to save room for everything else running.

Using a recent application server (Glassfish 3), will I get any performance benefit by using Apache as a proxy?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

How good is Glassfish at serving static content? Name-based vhosting? Redirects? I'm willing to bet that Apache is better at it all. If you're particularly interested in a small footprint frontend webserver, though, look at nginx instead of Apache.

share|improve this answer
add comment

Your Answer


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.