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 am trying to setup an ubuntu web server which utilizes both Apache's httpd web server for some content and glassfish for Java-based applications. I figured I would use mod_proxy as I've had luck playing with that a little in the past. I got it so the basic setup works. However, in trying to get glassfish running as a daemon, I found that the apache/glassfish connection breaks down anytime I stop/restart glassfish without restarting apache.

The basic directions I followed for setting up glassfish as a daemon can be found here: http://137.254.16.27/foo/entry/how_to_run_glassfish_v3.

A) Is there a way to configure things so I can restart glassfish without needing to restart apache? B) If not, is there a simple way to setup my glassfish daemon to restart apache at the same time without relying on glassfish and apache to both be on the system? In other words, it would be nice to have a script which would work cleanly on a server with glassfish and apache as well as a server with just glassfish.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

How long have you waited after the Apache connection breaks?

It will try again on the failed backend (the Glassfish server) after 60 seconds by default; you can speed that up by modifying your configuration:

# Retry this backend immediately instead of waiting
ProxyPass /location http://127.0.0.1:8080/location retry=0
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.