Apache and Tomcat behind ADSL-Router problem

  • jaakko777
  • Born
  • Born
  • jaakko777
  • Posts: 2

Post 3+ Months Ago

Hello all, im new to this and hope to find help on this forum to my problem.

To get started, I have a linux server behind an ADSL router. Connections work fine in both directions, with some exeptions.
Incoming connections terminate at the router unless i have opened the port with Virtual Server utility. With that I can direct it to a computer on my LAN and specify a port.

Ok well, I have Apache running (port 80) and Tomcat running (port 8080).
So now i can direct incoming http requests to my server but i must choose to which one Apache or Tomcat, but id like to have them both accessible.

The way this is supposed to work is by apace using the mod_proxy module. With that i can pass http requests with specific urls to a new url, forexample: http://myserver.com/webapp ---> http://myserver.com:8080/webapp

Then i must have Virtual Server set as follows port 80 directed to port 80 and port 8080 directed to port 8080.
Thats simple and logical and works well if someone writes in the browser myserver.com:8080/webapp . Then the request ends up in Tomcat and all work fine.
But, with apache redirecting (ProxyPass and ProxyPassReverse) a bad gateway error is produced. It seems that the router cannot handle a redirect from apache (coming from the LAN).

Anyone got any clues or got similar problems?

I temporarily serve my webapps by directing http (port 80) to my server port 8080, but that means i cant host normal stuff trough apache.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • jaakko777
  • Born
  • Born
  • jaakko777
  • Posts: 2

Post 3+ Months Ago

I got it solved.

I had to add to my /etc/hosts file my hostname.
Just so typical that the problem was the easiest to solve and i was looking all the other way. :lol:

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 16 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.