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.
Printable View
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.
[email]sb5309@yahoo.com[/email] wrote:
[color=blue]
> 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.[/color]
apache
On October 28, 2008 03:23, in comp.os.linux.networking, [email]sb5309@yahoo.com[/email]
(sb5309@yahoo.com) wrote:
[color=blue]
> 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 ?[/color]
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 [url]http://www.yahoo.com/index.html[/url], then the brower would
first determine that the server to contact is [url]www.yahoo.com[/url].
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 [url]www.yahoo.com[/url] and ask for the
[url]www.yahoo.com/index.html[/url] webpage.
Now, there may be more than one domain name that points to the machine that
[url]www.yahoo.com[/url] 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
[url]http://pitcher.digitalfreehold.ca/[/url] | GPG public key available by request
---------- Slackware - Because I know what I'm doing. ------
On Tue, 28 Oct 2008 09:26:27 -0400, Lew Pitcher wrote:
[color=blue]
> That's it. It's done by the web server, in response to details sent by the
> web browser.[/color]
[url]http://httpd.apache.org/docs/2.2/vhosts/name-based.html[/url]
On Tue, 28 Oct 2008 09:26:27 -0400, Lew Pitcher <lpitcher@teksavvy.com> wrote:
[color=blue]
>On October 28, 2008 03:23, in comp.os.linux.networking, [email]sb5309@yahoo.com[/email]
>(sb5309@yahoo.com) wrote:
>[color=green]
>> 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 ?[/color]
>
>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 [url]http://www.yahoo.com/index.html[/url], then the brower would
>first determine that the server to contact is [url]www.yahoo.com[/url].
>
>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 [url]www.yahoo.com[/url] and ask for the
>[url]www.yahoo.com/index.html[/url] webpage.
>
>Now, there may be more than one domain name that points to the machine that
>[url]www.yahoo.com[/url] 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.[/color]
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.
--
[url]http://bugsplatter.id.au[/url]
On Wed, 29 Oct 2008 01:37:41 +1100, Grant wrote:
[color=blue]
> Just some supporting evidence from the web-server log:[/color]
[ ... ][color=blue]
> There's three domain names in there ;)[/color]
All with different IP addresses. The OP's question was about different
hostnames using the -same- IP address.
Hello,
Dave Uhring a écrit :[color=blue]
> On Wed, 29 Oct 2008 01:37:41 +1100, Grant wrote:
>[color=green]
>> Just some supporting evidence from the web-server log:[/color]
> [ ... ][color=green]
>> There's three domain names in there ;)[/color]
>
> All with different IP addresses. The OP's question was about different
> hostnames using the -same- IP address.[/color]
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.
On Tue, 28 Oct 2008 16:18:49 +0100, Pascal Hambourg wrote:
[color=blue]
> Hello,
>
> Dave Uhring a écrit :[color=green]
>> On Wed, 29 Oct 2008 01:37:41 +1100, Grant wrote:
>>[color=darkred]
>>> Just some supporting evidence from the web-server log:[/color]
>> [ ... ][color=darkred]
>>> There's three domain names in there ;)[/color]
>>
>> All with different IP addresses. The OP's question was about different
>> hostnames using the -same- IP address.[/color]
>
> 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.[/color]
Heh! I misread that log. It's been over a year since I had to review
those things.
On Tue, 28 Oct 2008 09:57:51 -0500, Dave Uhring <daveuhring@yahoo.com> wrote:
[color=blue]
>On Wed, 29 Oct 2008 01:37:41 +1100, Grant wrote:
>[color=green]
>> Just some supporting evidence from the web-server log:[/color]
>[ ... ][color=green]
>> There's three domain names in there ;)[/color]
>
>All with different IP addresses. The OP's question was about different
>hostnames using the -same- IP address.[/color]
All on the same IP address, can't use 'host' yet? Poor thing...
Grant.
--
[url]http://bugsplatter.id.au[/url]
On Wed, 29 Oct 2008 07:46:47 +1100, Grant wrote:
[color=blue]
> All on the same IP address, can't use 'host' yet? Poor thing...[/color]
I have already admitted to having read the log wrong. Was that necessary?
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 [url]http://www.zzz.com[/url] 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.
[color=blue]
> 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.[/color]
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.
[color=blue]
> I sign up another ISP (call it new ISP) and create a domain name
> "zzz.com"[/color]
There can be only one zzz.com.
BTW: This is not the way to take control over DNS for a domain name. :->
[color=blue]
> Is it possible to navigate to the new ISP server by indicating the IP
> 201.100.100.200 ?[/color]
Yes... Out of the box.
[color=blue]
> Something like "http://201.100.100.200/zzz.com/index.html" (please
> forgive me I simply coin the http address).[/color]
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] - [url]http://httpd.apache.org/docs/2.0/[/url]
--
Regards/mvh Joachim Mæland
If everything seems under control, you're just not going fast enough.
-Mario Andretti
[email]sb5309@yahoo.com[/email] wrote:[color=blue]
> Assume a domain "zzz.com".
> Current DNS record points to the server, say, 201.100.100.100[/color]
[color=blue]
> Is it possible to navigate to the new ISP server by indicating the IP
> 201.100.100.200 ?[/color]
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
[color=blue]
> 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..![/color]
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.
[color=blue]
> Before that: Please take a look at the excellent Apache documentation[¹]!
>
> Hint, if phishing: mod_proxy
> Hint, if fantasizing: Virtual Host
>
> [1] - [url]http://httpd.apache.org/docs/2.0/[/url]
>
> --
> Regards/mvh Joachim Mæland
>[/color]
On Wed, 29 Oct 2008 19:09:47 -0700, sb5309 wrote:
[color=blue]
> 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.[/color]
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 [url]www.zzz.com[/url] 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.
[color=blue]
> 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.[/color]
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
Thanks for you tips Joachim.
I asked my ISP; one guy replied that I can access the public folder
using:
[url]http://201.100.100.200/-username[/url] (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.
[color=blue]
> On Wed, 29 Oct 2008 19:09:47 -0700, sb5309 wrote:
>[color=green]
> > 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.[/color]
>
> 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 [url]www.zzz.com[/url] 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.
>[color=green]
> > 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.[/color]
>
> 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...
>[/color]