Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Multiple IPs

  • 08-07-2004 5:17pm
    #1
    Registered Users Posts: 333 ✭✭


    Have a dsl connection and one of the things the account offers is multiple IPs.
    Basically I want to run a separate website thru a virtual host via Apache. Setting up Apache to use multiple IPs for separate websites is easy enough but I'm trying to find if I need to configure anything on my webserver/firewall...


Comments

  • Registered Users, Registered Users 2 Posts: 6,007 ✭✭✭Moriarty


    Apache can run hundreds of websites each with domains of their own off one ip address. It's part of the http 1.1 standard. It was done specifically to conserve ip address space.

    You almost certainly don't need more ips - infact, there are usually very few reasons people do need multiple ips.


  • Registered Users, Registered Users 2 Posts: 1,067 ✭✭✭tomk


    Originally posted by Virus_Inc
    I'm trying to find if I need to configure anything on my webserver/firewall...

    If for some reason you feel you must use separate addresses (not necessary -see above), you will most likely need to configure something on your web server and/or firewall.

    I'd go into more detail, if I had something to work from - post some details of your setup, and we can take it from there.


  • Registered Users Posts: 333 ✭✭Virus_Inc


    Whats the point in paying for a domain when I can get IPs for free?
    I have my own personal website but my flatmate wants to host some jsp stuff for development so I've set up tomcat and connected it thru to apache to that end...


  • Closed Accounts Posts: 79 ✭✭zt


    You can direct requests to the same IP address based on the URL. Have a look at virtual hosts.

    A machine can also have several IP addresses assigned to the same network card. Apache can tell the IP address that received the request.

    Furthermore, if you are using a clever firewall or Linux you can redirect requests to different ports. In this configuration you run multiple instances of Apache with different port numbers (8001, 9001, 10001 etc). You use IP tables to forward traffic on port 80 based on the requested IP address.

    The last case is good if you need to reduce the risk of web sites interfering with each other. You can also restart a single apache server without losing the other sites.

    Are you using JK2 for connecting Tomcat? You can do some very fancy things with this configuration such as using Apache for serving static content while JSP's are rendered with Tomcat, you can also distribut the Tomcat instances onto different machines .... That said, it is a tad painful to get the basic configuration working.

    I'm using Tomcat with Apache and tend to use a single Apache instance with a single IP address. I use a Tomcat instance for each site. If one goes bad, I just restart the particular Tomcat instance. The workers2 etc can be used to configure target Tomcat instance for a particular request.

    Have fun.


  • Banned (with Prison Access) Posts: 16,659 ✭✭✭✭dahamsta


    Whats the point in paying for a domain...
    You don't have to pay for a domain, you can simply use subdomains. It won't cost you a penny, unless you've got a complete arseholé for a registrar. If that's the case give myself, Michele or Steve a bell and we'll sort you out.
    ...when I can get IPs for free?
    Ever hear the phrase "there's no such thing as a free lunch"? IP addresses are restricted because ipv4 is limited in scope, so although you think they're "free", using them carefully and wisely is good for the community...

    ...but to bring it back down to human level, hostnames are a hell of a lot easier to remember than IP addresses, which is why the DNS was invented in the first place.

    Name-Based Hosting Good, IP-Based Hosting Bad, m'kay?

    adam


  • Advertisement
  • Registered Users Posts: 333 ✭✭Virus_Inc


    zt: Yeah, apache set up as a front-end for tomcat

    I dont have a domain period so subdomains arn't an option...(though there are plnety of dynamic dns services about) I can remember the IP and basically only use the thing to stick up photos for my family back home and as a testing ground for various development experiments...

    Yeah, I'm aware of how scarce fixed IPs are these days, which is one of the reasons why I'm looking at this wee exercise as a learning experience - making the most of them while they're available

    ...heh, i may not even let my flatmate near my server, knowing him it may be safer to NAT requests thru to his bawx :)


  • Registered Users, Registered Users 2 Posts: 6,007 ✭✭✭Moriarty


    Get a few subdomains (for free) from dyndns.org or one of the other companys that do this. Set up virtual domains in apache corresponding to the subdomains you just got from dyndns. Point all the different dyndns.org domains at the one ip address. There are bucket loads of free apps for *nix and windows that will auto-update your hosts to your current address if you dont have a fixed ip address. Apache can figure out which (sub)domain sent the browser to your box and will show the correct site accordingly.

    And all without fecking around with multiple ip addresses.


Advertisement