Florin
Florin

Reputation: 1429

Configure webserver:80 to direct a domain name request to a different running webserver:8080 on same machine, different port?

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.

Upvotes: 0

Views: 719

Answers (3)

Parand
Parand

Reputation: 106390

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.

Upvotes: 2

number5
number5

Reputation: 16453

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

Upvotes: 2

anon
anon

Reputation:

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.

Upvotes: 1

Related Questions