httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dick Davies <>
Subject Re: [users@httpd] Blocking http requests to certain URLs.
Date Sat, 08 Jan 2005 06:08:46 GMT
* Aman Raheja <> [0148 02:48]:
> It sure means you are listening on * and ServerName directive not setup
> Be specific and use the Listen directive wisely, like
> Listen
> and use the same on your VirtualHost, if you have one and ServerName 
> directive be
> ServerName
> Then only will respond.

No, I don't think that's right. There's always a default vhost, if you
only have one then all requests to port 80 end up there regardless of
what the Host: header (domain name the browser asked for) is.
If you don't define a vhost at all (which I guess is the case here) then
all requests end up at the DocumentRoot, whether you get there by name
or the IP.

Christopher, what do you want to happen when someone goes to those domains?
Probably easiest to put something in the default DocumentRoot (up in 'Section 2'
of httpd.conf) which asks people to use the correct name or whatever, and then
create a virtual host for

( I'm sure someone will recommend doing something with mod_rewrite too, but I
tend to think that's overly complex. If you're going to rewrite to somewhere 
anyway, you may as well just have the vhost system do that for you.

To misquote Jamie Zawinski:

	'Some people, when confronted with a problem, think:
		"I know, I'll use mod_rewrite".
	Now they have two problems.'

> Christopher J. Bottaro wrote:
> >Hello,
> >I'm very new to Apache and web stuff in general.  Please bare with me.
> >
> >I have my name server setup to route the following URLs to a single IP
> >address:
> >
> >
> >
> >
> >I want Apache to reject http requests to and
> >  Currently (default Apache setup on Fedora Core 3), I can
> >put in my webbrowser "" and it will bring me to my
> >homepage.  I don't want that.

'Everybody I know who is right always agrees with ME.'
		-- Rev Lady Mal
Rasputin :: Jack of All Trades - Master of Nuns

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message