Find the answer to your Linux question:
Results 1 to 5 of 5
Hi, I have this Suse 10.1 distro for the linux box. I have set up so that this server is the part of already existing Windows 2000 domain network. I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2006
    Posts
    2

    Multiple sites on one server


    Hi,
    I have this Suse 10.1 distro for the linux box. I have set up so that this server is the part of already existing Windows 2000 domain network. I have set up multiple websites using virtual hosts and they work fine too. Now the real issue is I have to let the clients view these websites. I have one external IP address that has been assigned through firewall to this box. I am unsure how to set up the whole thing so that clients can type in some address and reach to the box say client A needs to test this website.. the internal address for that site I am using is http://xyz.linux-dev/ I want client A to be able to reach this and so on for other clients.
    Any help is appreciated.
    Thanks
    Subrato

  2. #2
    Linux Enthusiast
    Join Date
    Dec 2004
    Posts
    637
    Forward TCP 80 to the internal interface of your Linux box and the Linux box via the virtual hosts should resolve the particular request if setup properly.

  3. #3
    Just Joined!
    Join Date
    Sep 2006
    Posts
    2

    Question External access to mutliple sites ?

    Thanks for the reply. I think I might have not explained my situation very clearly. I would try to explain it again in little clear terms

    (Windows domain) ---> Linux Box (server under windows domain)
    (Linux)---> many sites accessible from my machine using http://site1.linux-dev/ , http://site2.linux-dev/
    I am unable to even access the sites from other machines on the network as I had made an entry in my hosts file like site1.linux-dev (IP address)

    Now as there are different clients, I want the clients to access say site1.linux-dev or site2.linux-dev . Right now I have this external IP address say xxx.yyy.zzz.aaa which I goes to the default site. It takes first virtual site from the httpd.conf as default site. But I would like say client 2 to access his site say site2 using the same IP address. Now I am just unclear on how exactly should I set it up so that linux would distinguish which site to go to and move accordingly.
    Thanks in advance
    Subrato

  4. #4
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    you need to use name based virtual hosts, do a google search for that. it is basically setting apache up to use one ip and direct traffic based on the url.

    so you dns entries for all of your urls will point to the same ip address, and then apache will do the rest of the work.

  5. #5
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,807
    Hello subrato. I've been running this configuration for some time now; here's what you've actually go to do.

    As long as the name-based virtual hosts is already working (and you say it is), all you need are a few DNS tweaks.

    As an example let's say you have 'www.site.org'. And your web server also supports 'temp.site.org' and 'linux.site.org'.

    All you have to do is make 'temp.site.org' and 'linux.site.org' resolve in DNS to 'www.site.org'. You do this with a CNAME entry in DNS.

    So, in your DNS zone file for site.org, you might have something that looks like this:

    Code:
    www     IN   A   1.2.3.4
    and you just need to add:
    Code:
    temp    IN    CNAME  www.site.org.
    linux   IN    CNAME  www.site.org.
    It doesn't matter if this is inside or outside the lan - of course if it's outside, this change needs to go onto the public nameserver for your domain.

    This works becauset the browser request to the 'temp' site would look cause a lookup of 'temp.site.org' which would resolve to 'www.site.org' which would then get resolved to an IP address. Once the IP address is known, it is sent the full request with the original site name in the request line, e.g. 'temp.site.org/index.html'.
    Linux user #126863 - see http://linuxcounter.net/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •