tags:

views:

357

answers:

3

I run Jetty6 yet gladly place Apache in the front if needs be.

I would like to have two webserver instances running on the same machine on different ports. I would like the instance on port 80 to redirect the second public domain name to the second webserver on port 8080.

This should not be visible to web users.

Thank you.

+1  A: 

If I understand your question correctly, you need to enable mod_proxy in Apache, then use this line on the web server running on port 80.

ProxyPassReverse / http://localhost:8080/

This will reverse proxy all requests to port 80 onto port 8080.

Simon,Would the public reach both domains in the same way: http://domain_x.com, http://domain_y.com?
Florin
+2  A: 

just use the mod_proxy of apache could solve your problem

  ProxyRequests Off

  <Proxy *>
    Order deny,allow
    Allow from all
  </Proxy>

  ProxyPass        /  http://localhost:8080/
  ProxyPassReverse /  http://localhost:8080/

more on apache docs

number5
+1  A: 

nginx setup as a proxy is a common method for doing this. It has a good reputation and I personally know of several high traffic sites using it with good results.

The twiki has lots of info, and this proxy setup is probably similar to what you're looking for.

Parand