Click to See Complete Forum and Search --> : Any Request
lm72_suse
11-16-2002, 04:22 PM
Hi,
My web server will answer any request if type in the ip and not the url i would like to stop that.
So unless someone does not type in www.myserver.com for example it will not reply to it does anyone how could go about this thanks.
Alex :)
gman420
11-16-2002, 06:56 PM
I don't think it is possible. A domain name is a logical representative for an IP address.
pbratkowski
11-16-2002, 06:59 PM
do u mean it doesn't work when you type www.serveraddress.com, or that you don't want it to work if ppl type http://xxx.xxx.xxx.xxx (where xxx.xxxx.xxxx.xxx = ur ip)?
if you mean that you don't want it to answer to requests that use your ip address instead of dns, it's impossible because the tcp/ip protocol, used by the http server, uses the ip address to communicate. when you type a dns address into a web browser, it gets the ip information from the dns server, or the hosts file, and uses the ip address, so even if you found a way, then it would simply reject all requests.
lm72_suse
11-16-2002, 07:10 PM
What mean is that do not want to handle any unresolved host.
Let say my site is www.myserver.com if user types's www2.myserver.com or any other unassigned host name i do not wnat to asnswer and display a default page.
I know it can be done but forget how.
Alex :)
pbratkowski
11-16-2002, 10:35 PM
i don't think it works that way... i know that computers running (gack!) windows automatically add a prefix that you can choose (www, for instance) if they don't find a page, but i don't think there's any way for automatically redirecting a request typed with a wrong address, because the client computer wouldn't know what the server's ip address is, or where to get it... you could always get other names like ww.myservername.com registered (like yahoo does... if u type w.yahoo.com, or ww.yahoo.com, it opens a page that links to www.yahoo.com... but type http://linuxrocks.yahoo.com and it won't work)...
if there is any other way to configure it, it would be on the client's side, because web browsers do not use names to connect to servers, but ip addresses, so the client would need to know what ip address to convert the dns name to
lm72_suse
11-17-2002, 12:31 AM
You know how apache by default will answer any unhandled request if does not find vhost enrty assicaited a certain name but that does point to your web server it will spit out a default pages for apache etc...
That what wish to disable.
I think answer my question but just make i had explained my properly.
Thanks,
Alex :)
gman420
11-17-2002, 09:45 PM
www2.myserver.com needs to have a record with your name server so it can converted into an IP address.
If you don't have the record the the request to www2.myserver.com would not be resolved.