Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have little experience with hosting and administering jsp sites in Apache Tomcat 7.0.8. Today I tried to host a site Apache Tomcat 7.0.8 but its giving me error like following:

Bad Gateway

The proxy server received an invalid response from an upstream server.

Additionally, a 502 Bad Gateway error was encountered while trying to use an ErrorDocument to handle the request.

How do I fix such issues.

share|improve this question

migrated from Mar 3 '11 at 15:34

This question came from our site for professional and enthusiast programmers.

look at the logs and see if there is any error, and add that to the question – JoseK Mar 3 '11 at 6:42
Hi Jose thanks for the reply, I could resolve this issue now by restarting the server and properly starting Apache and Tomcat. I have a small question again though. How do make my site,, read from webapps/mywebsite.war; It is currently reading from ROOT folder. Where do I need to make the changes in settings? – Guru Mar 3 '11 at 9:13
You are supposed to create separate posts for separate questions. But this your question is already answered many times on stackoverflow, just do a search and you'll find the answer. – mindas Mar 3 '11 at 10:02
Hi Mindas thanks for your suggestion. I did search for that question all over but I couldn't find one specific to my issue. I'd appreciate if you could pass me any guidance or any helpful URL. Thanks again. – Guru Mar 3 '11 at 10:44

In order to make your site read from webapps/mywebsite.war, it depends what do you use for reverse proxy:

  • Apache Web Server + mod_rewrite
  • Apache Web Server + mod_proxy
  • Apache Web Server + mod_jk

You can find in their manuals how to do that. Tell me what you are using, may be I can give some more information.

share|improve this answer

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.