2 webservers on 1 IP?

edited April 2006 in Science & Tech
I hope someone can help here. I have a Cobalt Raq4 connected to my home DSL internet connection and I'm running several sites successfully using a dynamic IP service.

I would like to add a second Raq550 but from what I can find out it seems I cannot run 2 webservers both pointing to port 80.

Is there any way around this? I tried to change the default Apache port on the second box (and virtual hosts as well), but it doesn't work.

Any help would be appreciated!

Comments

  • EMTEMT Seattle, WA Icrontian
    edited April 2006
    Only one of the two computers can accept the incoming port 80 connection, and it has to accept all of them. I don't know a way around this, it really seems like you'd need 2 IPs... :-/
  • JBJB Carlsbad, CA
    edited April 2006
    What if you:
    1)changed the default apache port on the 2nd server
    2)ran your own DNS and configure the 2nd server's addresses to point to the correct port (that you changed in step 1) on your connection?

    I'm not sure if you can specify the ports in your DNS table, but I would imagine you can. I am a bit rusty on networking since its been a few quarters since I took the class.
  • JBJB Carlsbad, CA
    edited April 2006
    Another thought about the DNS server:

    If that is behind your router (NAT) you might be able to configure the sites with the local address (i.e. 192.168.0.xxx). Again, I'm no pro on the networking side but maybe you could look into that type of setup to get started.
  • edited April 2006
    Thanks for the replies!

    I'll look at the DNS option and have a go at that. The sites point to the internal address of each server and so work perfectly behind the router. I tried changing the default port of the second server and setting up a rule on the router to forward to that port but no joy.

    If all else fails I might look at co-locating the 2nd box.
  • KwitkoKwitko Sheriff of Banning (Retired) By the thing near the stuff Icrontian
    edited April 2006
    Your router should be able to port forward the same port on 2 different machines. As long as each machine has a different IP for its listen directive, you should be okay. I think. :)
  • EnverexEnverex Worcester, UK Icrontian
    edited April 2006
    As stated you have 2 options.

    Either use 2 different ports (issue with this is that if you run one on any port other than 80 then they have to be specified in the URL, i.e. [url]www.badger.com:87)[/url].

    Use a second domain, but I can't see how a normal router could forward using this, you'd have to have the port forwarding as usual then have the machine it's forwarded to to then forward to the correct machine after it reads the domain it's directed to.
  • edited April 2006
    I tried changing the listen directive but loading the page goes into a loop. I guess this isn't really possible on a single DSL connection and the type of router I have. Colo seems a better option. Thanks for all the help!
  • shwaipshwaip bluffin' with my muffin Icrontian
    edited April 2006
    if you're using noip for dns, you can set it up to automatically include the port info in the url.
    Many residential ISPs Block port 80, No-IP Free DNS enables you to run a webserver on a non-standard port, yet users accessing your site never have to enter a port number. For example http://yourname.no-ip.com/ can redirect to http://yourname.no-ip.com:8833/
  • edited April 2006
    shwaip wrote:
    if you're using noip for dns, you can set it up to automatically include the port info in the url.

    I'm with DNS Made Easy and they offer a similar service. That sounds like the solution, many thanks!
  • EMTEMT Seattle, WA Icrontian
    edited April 2006
    shwaip wrote:
    if you're using noip for dns, you can set it up to automatically include the port info in the url.

    I'm baffled--how does this work? I can't find this info easily (or any examples to test). The way I see it there are only 3 ways this can work:

    1) The address just gives a redirect to another address ending in :8080 (you could tell in the browser after the link resolves)
    2) The address is actually a proxy hosted by the company (seems too costly for a free service! but the browser would be none the wiser)
    3) The info is in the DNS record somewhere (if so does the browser indicate the port in the address bar or no?)
  • edited April 2006
    EMT wrote:
    I'm baffled--how does this work?

    From DNS Made easy;

    HTTP Redirection Record
    These are special records in that they are a combination of an A record and the use of an application server. There will be an A record pointing to our application servers which will redirect to the URL you specify.

    This isn't a free service unfortunately but costs $9.95 per year on top of my existing account charges of around $20, not bad considering what I would have to pay to get extra static IP's from my service provider.
Sign In or Register to comment.