Re: w.<domain name> and ww.<domain name> and apache



On Tue, 14 Feb 2006, Tim revealed to all and sundry that:

On Mon, 13 Feb 2006 08:34:14 -0800, Ackermann Karl sent:

In httpd.conf I defined http://www.<domain name> and
http://<domain name> as valid URLs for my server. Nevertheless,
http requests like http://ww.<domain name> and http://w.<domain
name> are routed to the same site.

You haven't detailed how you did that, so we can't guess what's
going wrong.

True enough...

As I have some other intentionally created subdomains, which I
still want to use: what can/must I do to block the access to my
server for URLs with only 1 or 2 "w"?

Seems to me that the O.P could do well to study a tutorial on how to
set up name-based virtual hosts. AFAIR there's a perfectly reasonable
one linked from the Apache httpd web site

In what way do you mean "block"?

Obviously this can't exactly be "blocked" (i.e at the network level),
since the server has no idea what host name the client requested,
until it has allowed the HTTP request, and consulted the resulting
request headers. What it does then, of course, is limited only by the
imagination of the implementer.

The clue is to configure the default virtual host to take all the
unknown names and the numeric IP address (and do with it what you
will), while configuring all the bona fide host names to go to
non-default virtual host configurations and serve them with the good
content.

*If* that's what you really want, of course. (Whether it is, is left
as an "exercise for the student").

h t h

--

Most folks would think a Referer header is something you smoke.
-- Bruce Tomlin in a.s.r
.



Relevant Pages