Networking Forums

Networking Forums > Computer Networking > Linux Networking > One web server, multiple domains

Reply
Thread Tools Display Modes

One web server, multiple domains

 
 
sb5309@yahoo.com
Guest
Posts: n/a

 
      10-28-2008, 06:23 AM
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 With Quote
 
 
 
 
Baho Utot
Guest
Posts: n/a

 
      10-28-2008, 08:27 AM
(E-Mail Removed) 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
 
Reply With Quote
 
Lew Pitcher
Guest
Posts: n/a

 
      10-28-2008, 12:26 PM
On October 28, 2008 03:23, in comp.os.linux.networking, (E-Mail Removed)
((E-Mail Removed)) 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. ------


 
Reply With Quote
 
Pascal Hambourg
Guest
Posts: n/a

 
      10-28-2008, 02:18 PM
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.
 
Reply With Quote
 
Grant
Guest
Posts: n/a

 
      10-28-2008, 07:46 PM
On Tue, 28 Oct 2008 09:57:51 -0500, Dave Uhring <(E-Mail Removed)> 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
 
Reply With Quote
 
sb5309@yahoo.com
Guest
Posts: n/a

 
      10-29-2008, 01:17 AM
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.

 
Reply With Quote
 
Joachim Mæland
Guest
Posts: n/a

 
      10-29-2008, 08:48 AM
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
 
Reply With Quote
 
Chris Davies
Guest
Posts: n/a

 
      10-29-2008, 12:01 PM
(E-Mail Removed) 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
 
Reply With Quote
 
sb5309@yahoo.com
Guest
Posts: n/a

 
      10-30-2008, 01:09 AM

> 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
>

 
Reply With Quote
 
Joachim Mæland
Guest
Posts: n/a

 
      10-30-2008, 05:27 AM
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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Routing multiple domains to 1 mail server Yannis Windows Networking 5 09-22-2008 07:46 PM
Multiple Domains One Server JJ Windows Networking 3 04-15-2008 04:37 PM
Multiple Domains S Lane Windows Networking 6 02-21-2006 04:57 PM
Multiple domains on 1 server? Steven Cooke Windows Networking 2 09-15-2004 07:45 PM
Multiple Domains - XP Jo Bloe Home Networking 2 08-11-2004 12:29 AM



1 2 3 4 5 6 7 8 9 10 11