One web server, multiple domains - Networking

This is a discussion on One web server, multiple domains - Networking ; A web server typically hosts multiple domains, eg "abcd.com", "123456.com" etc. When I ping "abcd.com" or "123456.com", it returns a single IP address. What mechanism is used to identify which domain to serve ? Thanks....

+ Reply to Thread
Results 1 to 16 of 16

Thread: One web server, multiple domains

  1. One web server, multiple domains

    A web server typically hosts multiple domains, eg "abcd.com",
    "123456.com" etc.

    When I ping "abcd.com" or "123456.com", it returns a single IP
    address.

    What mechanism is used to identify which domain to serve ?

    Thanks.

  2. Re: One web server, multiple domains

    sb5309@yahoo.com wrote:

    > A web server typically hosts multiple domains, eg "abcd.com",
    > "123456.com" etc.
    >
    > When I ping "abcd.com" or "123456.com", it returns a single IP
    > address.
    >
    > What mechanism is used to identify which domain to serve ?
    >
    > Thanks.



    apache

  3. Re: One web server, multiple domains

    On October 28, 2008 03:23, in comp.os.linux.networking, sb5309@yahoo.com
    (sb5309@yahoo.com) wrote:

    > A web server typically hosts multiple domains, eg "abcd.com",
    > "123456.com" etc.
    >
    > When I ping "abcd.com" or "123456.com", it returns a single IP
    > address.
    >
    > What mechanism is used to identify which domain to serve ?


    Domain identification is a part of the HTTP protocol that the client
    application (the web browser) populates.

    When the client (web browser) "clicks" on a hyperlink, the browser will
    disect the hyperlink to determine the name of the server. For instance, if
    the hyperlink were http://www.yahoo.com/index.html, then the brower would
    first determine that the server to contact is www.yahoo.com.

    The client then opens a communications path to that server, and asks for the
    web page using the entire name from the url. In my yahoo example, the
    browser would connect to TCP port 80 of www.yahoo.com and ask for the
    www.yahoo.com/index.html webpage.

    Now, there may be more than one domain name that points to the machine that
    www.yahoo.com points to. So, the web server on that machine looks at the
    text of the request ("GET www.yahoo.com/index.html") and determines that it
    has to retrieve the "index.html" page from the "www.yahoo.com" profile.

    That's it. It's done by the web server, in response to details sent by the
    web browser.

    --
    Lew Pitcher

    Master Codewright & JOAT-in-training | Registered Linux User #112576
    http://pitcher.digitalfreehold.ca/ | GPG public key available by request
    ---------- Slackware - Because I know what I'm doing. ------



  4. Re: One web server, multiple domains

    On Tue, 28 Oct 2008 09:26:27 -0400, Lew Pitcher wrote:

    > That's it. It's done by the web server, in response to details sent by the
    > web browser.


    http://httpd.apache.org/docs/2.2/vhosts/name-based.html


  5. Re: One web server, multiple domains

    On Tue, 28 Oct 2008 09:26:27 -0400, Lew Pitcher wrote:

    >On October 28, 2008 03:23, in comp.os.linux.networking, sb5309@yahoo.com
    >(sb5309@yahoo.com) wrote:
    >
    >> A web server typically hosts multiple domains, eg "abcd.com",
    >> "123456.com" etc.
    >>
    >> When I ping "abcd.com" or "123456.com", it returns a single IP
    >> address.
    >>
    >> What mechanism is used to identify which domain to serve ?

    >
    >Domain identification is a part of the HTTP protocol that the client
    >application (the web browser) populates.
    >
    >When the client (web browser) "clicks" on a hyperlink, the browser will
    >disect the hyperlink to determine the name of the server. For instance, if
    >the hyperlink were http://www.yahoo.com/index.html, then the brower would
    >first determine that the server to contact is www.yahoo.com.
    >
    >The client then opens a communications path to that server, and asks for the
    >web page using the entire name from the url. In my yahoo example, the
    >browser would connect to TCP port 80 of www.yahoo.com and ask for the
    >www.yahoo.com/index.html webpage.
    >
    >Now, there may be more than one domain name that points to the machine that
    >www.yahoo.com points to. So, the web server on that machine looks at the
    >text of the request ("GET www.yahoo.com/index.html") and determines that it
    >has to retrieve the "index.html" page from the "www.yahoo.com" profile.
    >
    >That's it. It's done by the web server, in response to details sent by the
    >web browser.


    Just some supporting evidence from the web-server log:
    2008-10-29 00:13:53 +1100 scatter.mine.nu 208.36.144.9 "GET /robots.txt HTTP/1.0
    2008-10-29 00:15:56 +1100 bugsplatter.id.au 74.6.8.122 "GET /kernel/boxen/deltre
    2008-10-29 00:15:58 +1100 bugsplatter.id.au 74.6.8.122 "GET /kernel/boxen/deltre
    2008-10-29 00:23:29 +1100 bugsplatter.id.au 65.55.108.211 "GET /robots.txt HTTP/
    2008-10-29 00:23:30 +1100 bugsplatter.id.au 65.55.108.211 "GET /kernel/hwmon/adm
    2008-10-29 00:44:29 +1100 bugsplatter.id.au 67.195.37.169 "GET / HTTP/1.0" 200 4
    2008-10-29 00:44:44 +1100 bugsplatter.id.au 67.195.37.169 "GET /bugs.css HTTP/1.
    2008-10-29 00:48:47 +1100 bugsplatter.mine.nu 66.249.65.46 "GET /test/boxen/semp
    2008-10-29 00:53:37 +1100 bugsplatter.id.au 65.55.108.212 "GET /netdraw/netdrawm
    2008-10-29 01:05:22 +1100 bugsplatter.mine.nu 66.249.65.46 "GET /test/boxen/semp

    There's three domain names in there

    Grant.
    --
    http://bugsplatter.id.au

  6. Re: One web server, multiple domains

    On Wed, 29 Oct 2008 01:37:41 +1100, Grant wrote:

    > Just some supporting evidence from the web-server log:

    [ ... ]
    > There's three domain names in there


    All with different IP addresses. The OP's question was about different
    hostnames using the -same- IP address.


  7. Re: One web server, multiple domains

    Hello,

    Dave Uhring a écrit :
    > On Wed, 29 Oct 2008 01:37:41 +1100, Grant wrote:
    >
    >> Just some supporting evidence from the web-server log:

    > [ ... ]
    >> There's three domain names in there

    >
    > All with different IP addresses. The OP's question was about different
    > hostnames using the -same- IP address.


    The three domain names resolve into the same IP address. The IP
    addresses shown in the log are the sources of the requests. Most of them
    seem to be search engine bots.

  8. Re: One web server, multiple domains

    On Tue, 28 Oct 2008 16:18:49 +0100, Pascal Hambourg wrote:

    > Hello,
    >
    > Dave Uhring a écrit :
    >> On Wed, 29 Oct 2008 01:37:41 +1100, Grant wrote:
    >>
    >>> Just some supporting evidence from the web-server log:

    >> [ ... ]
    >>> There's three domain names in there

    >>
    >> All with different IP addresses. The OP's question was about different
    >> hostnames using the -same- IP address.

    >
    > The three domain names resolve into the same IP address. The IP
    > addresses shown in the log are the sources of the requests. Most of them
    > seem to be search engine bots.


    Heh! I misread that log. It's been over a year since I had to review
    those things.


  9. Re: One web server, multiple domains

    On Tue, 28 Oct 2008 09:57:51 -0500, Dave Uhring wrote:

    >On Wed, 29 Oct 2008 01:37:41 +1100, Grant wrote:
    >
    >> Just some supporting evidence from the web-server log:

    >[ ... ]
    >> There's three domain names in there

    >
    >All with different IP addresses. The OP's question was about different
    >hostnames using the -same- IP address.


    All on the same IP address, can't use 'host' yet? Poor thing...

    Grant.
    --
    http://bugsplatter.id.au

  10. Re: One web server, multiple domains

    On Wed, 29 Oct 2008 07:46:47 +1100, Grant wrote:

    > All on the same IP address, can't use 'host' yet? Poor thing...


    I have already admitted to having read the log wrong. Was that necessary?


  11. Re: One web server, multiple domains; a slight twist

    Assume a domain "zzz.com".

    Current DNS record points to the server, say, 201.100.100.100

    I sign up another ISP (call it new ISP) and create a domain name
    "zzz.com" (a default index.html is usually created and placed in the
    public folder). Assume that the server of the new ISP is
    201.100.100.200.

    When I type http://www.zzz.com in a browser, the traffic will go to
    201.100.100.100.

    Question:

    Is it possible to navigate to the new ISP server by indicating the IP
    201.100.100.200 ?

    Something like "http://201.100.100.200/zzz.com/index.html" (please
    forgive me I simply coin the http address).

    Thanks.











    > A web server typically hosts multiple domains, eg "abcd.com",
    > "123456.com" etc.
    >
    > When I ping "abcd.com" or "123456.com", it returns a single IP
    > address.
    >
    > What mechanism is used to identify which domain to serve ?
    >
    > Thanks.


  12. Re: One web server, multiple domains; a slight twist

    On Tue, 28 Oct 2008 19:17:55 -0700, sb5309 wrote:

    Disclaimer: Answers provided is for the highly configurable HTTP server:
    Apache. Different HTTP servers might pose other severe limitations.

    > I sign up another ISP (call it new ISP) and create a domain name
    > "zzz.com"


    There can be only one zzz.com.

    BTW: This is not the way to take control over DNS for a domain name. :->

    > Is it possible to navigate to the new ISP server by indicating the IP
    > 201.100.100.200 ?


    Yes... Out of the box.

    > Something like "http://201.100.100.200/zzz.com/index.html" (please
    > forgive me I simply coin the http address).


    Yes... Out of the box.

    This looks to me like a phishing attempt or that you are fantasizing
    circumstances spiced with some of your own misguided attempts for a
    solution, without actually telling us what you really want to accomplish.
    Please provide an actual problem, described as an actual case, not based
    on a self imposed dead end, disguised as a partly working solution..!

    Before that: Please take a look at the excellent Apache documentation[¹]!

    Hint, if phishing: mod_proxy
    Hint, if fantasizing: Virtual Host

    [1] - http://httpd.apache.org/docs/2.0/

    --
    Regards/mvh Joachim Mæland

    If everything seems under control, you're just not going fast enough.
    -Mario Andretti

  13. Re: One web server, multiple domains; a slight twist

    sb5309@yahoo.com wrote:
    > Assume a domain "zzz.com".
    > Current DNS record points to the server, say, 201.100.100.100


    > Is it possible to navigate to the new ISP server by indicating the IP
    > 201.100.100.200 ?


    If the webserver on 201.100.100.200 relies on virtual names to
    differentiate multiple websites then this won't work.

    In this situation, the way to make it work for you is to add an entry
    to your /etc/hosts that defines zzz.com as being at 201.100.100.200.

    Chris

  14. Re: One web server, multiple domains; a slight twist


    > This looks to me like a phishing attempt or that you are fantasizing
    > circumstances spiced with some of your own misguided attempts for a
    > solution, without actually telling us what you really want to accomplish.
    > Please provide an actual problem, described as an actual case, not based
    > on a self imposed dead end, disguised as a partly working solution..!



    I have heard of "phishing" frequently, but I don't know what it means
    and never bother to know what it is. :-) :-(

    I am helping a small company doing internet-related work; the company
    is also a ISP service reseller. All its technical people have left; my
    background is mainly in C/C++, internet stuff is quite new to me.

    The question arises out of curiosity, from a recent attempt by a
    temporary staff to transfer a domain from one web server to another
    web server; he forgot to change the DNS record (the company is dealing
    with 2 ISPs). Later I was asked to FTP somes files to a server, which
    end up in the "old" server.

    Of course I can go to the control panel of the other ISP and transfer
    files using its file manager.

    Out of the blue, I wonder whether it is possible to access the other
    server using IP address, thereby avoiding a DNS look-up (which will
    end-up in the "old" server). Off my head, I believe it is possible,
    just that what is the form of this command.

    The answer "yes" is sufficient; I shall experiment a bit myself.
    Thanks.

    > Before that: Please take a look at the excellent Apache documentation[¹]!
    >
    > Hint, if phishing: mod_proxy
    > Hint, if fantasizing: Virtual Host
    >
    > [1] - http://httpd.apache.org/docs/2.0/
    >
    > --
    > Regards/mvh Joachim Mæland
    >


  15. Re: One web server, multiple domains; a slight twist

    On Wed, 29 Oct 2008 19:09:47 -0700, sb5309 wrote:

    > The question arises out of curiosity, from a recent attempt by a
    > temporary staff to transfer a domain from one web server to another web
    > server; he forgot to change the DNS record (the company is dealing with
    > 2 ISPs). Later I was asked to FTP somes files to a server, which end up
    > in the "old" server.


    Please do not mix DNS records, domain creation and Virtual Host
    management on a LAMP server.

    zzz.com is resolved by at least two name servers. Without control over
    the domain, you can not change the name servers. Without control over the
    name servers, you can not change the IP addresses for the hosts on the
    domain.

    Having control over the resolver of your client, you can however make
    your client and software running on the client, access the new host.

    A line in /etc/host like this:

    201.100.100.200 www.zzz.com zzz.com

    will make sure your client will access the new server, as if the DNS
    records where updated. Please restart your browser and FTP client.

    > Of course I can go to the control panel of the other ISP and transfer
    > files using its file manager.
    >
    > Out of the blue, I wonder whether it is possible to access the other
    > server using IP address, thereby avoiding a DNS look-up (which will
    > end-up in the "old" server). Off my head, I believe it is possible, just
    > that what is the form of this command.
    >
    > The answer "yes" is sufficient; I shall experiment a bit myself. Thanks.


    Now you mix FTP and HTTP, spiced with Virtual Host configuration... Both
    the old, and the new server has a target directory for uploading it's
    HTTP served files. If you can find and address this directory, it's
    surely possible to FTP files into this directory, using IP address and
    the proper path.

    The same goes for HTTP requests, but the path is probably not the same as
    when using FTP.

    Feel free to experiment...

    --
    Regards/mvh Joachim Mæland

    If everything seems under control, you're just not going fast enough.
    -Mario Andretti

  16. Re: One web server, multiple domains; a slight twist

    Thanks for you tips Joachim.

    I asked my ISP; one guy replied that I can access the public folder
    using:

    http://201.100.100.200/-username (IP just an example)

    The username is the owner of the domain/account (I suppose for this
    ISP, not a general case).

    Anyway this is just out of curiosity; I shall tinker with it only when
    I am very free.



    > On Wed, 29 Oct 2008 19:09:47 -0700, sb5309 wrote:
    >
    > > The question arises out of curiosity, from a recent attempt by a
    > > temporary staff to transfer a domain from one web server to another web
    > > server; he forgot to change the DNS record (the company is dealing with
    > > 2 ISPs). Later I was asked to FTP somes files to a server, which end up
    > > in the "old" server.

    >
    > Please do not mix DNS records, domain creation and Virtual Host
    > management on a LAMP server.
    >
    > zzz.com is resolved by at least two name servers. Without control over
    > the domain, you can not change the name servers. Without control over the
    > name servers, you can not change the IP addresses for the hosts on the
    > domain.
    >
    > Having control over the resolver of your client, you can however make
    > your client and software running on the client, access the new host.
    >
    > A line in /etc/host like this:
    >
    > 201.100.100.200 www.zzz.com zzz.com
    >
    > will make sure your client will access the new server, as if the DNS
    > records where updated. Please restart your browser and FTP client.
    >
    > > Of course I can go to the control panel of the other ISP and transfer
    > > files using its file manager.
    > >
    > > Out of the blue, I wonder whether it is possible to access the other
    > > server using IP address, thereby avoiding a DNS look-up (which will
    > > end-up in the "old" server). Off my head, I believe it is possible, just
    > > that what is the form of this command.
    > >
    > > The answer "yes" is sufficient; I shall experiment a bit myself. Thanks.

    >
    > Now you mix FTP and HTTP, spiced with Virtual Host configuration... Both
    > the old, and the new server has a target directory for uploading it's
    > HTTP served files. If you can find and address this directory, it's
    > surely possible to FTP files into this directory, using IP address and
    > the proper path.
    >
    > The same goes for HTTP requests, but the path is probably not the same as
    > when using FTP.
    >
    > Feel free to experiment...
    >


+ Reply to Thread