[CLUE-Tech] simulating DNS function

Jim Ockers ockers at ockers.net
Sun May 9 15:52:20 MDT 2004


Gus:

You want to test the function of your web server, not so much the
DNS, if I understand your question.

The domain-based virtual hosting is a function of HTTP 1.1.  You need
the following information in a HTTP 1.1 transaction:

1. The request.
2. The Host: directive.
3. Other stuff is optional but not required by the HTTP 1.1 spec.

> I have multiple domains on my webserver and it is working fine.
> 
> My question is to whether there is a way to directly access a particular
> domain on my server without using a DNS server.
> 
> If I wanted to go directly to port 80 on my server, I would enter
> 111.111.111.111:80  ( if 111.111.111.111 was the address for my server )
> 
> Is there a form like 111.111.111.111:mydomain  to go to
> my domain located at 111.111.111.111 ?

Try this:

[313] tahoua.ockers.net:/home/ockers > telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET / HTTP/1.1
Host: www.ibm.com

HTTP/1.1 200 OK
..and so on

What you need to type in is the GET request and Host: information.  You
will put your virtual host domain name in the Host: HTTP header.  After
the Host: header you have to hit ENTER twice, then the web server will
start streaming data back through the telnet connection and you can see
what is returned.

Hope this helps,
Jim

-- 
Jim Ockers, P.Eng. (ockers at ockers.net)
Contact info: please see http://www.ockers.net/



More information about the clue-tech mailing list