Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
April 16, 2007, 5:05 am
rate this thread
I am running a couple virtual hosts on Apache (windows) and was
wondering if there is a way to disable access to the web pages via IP
For example, I only want the actual websites accessible by someone
typing in the domain name.
Currently, if someone types in 22.214.171.124, it pulls up the main web
site I'm hosting. I would like to disable this so the only way to get
to the main site is by typing http://www.mysite.com .
Thanks for the assistance!
Re: Apache: Disable Access By Server's IP Address
Define another virtual host, which must be the first in the apache.conf.
Redirect 404 /
The first virtual host will be used by apache for any host name that is not
used by one of your 'real' virtual hosts, including access by IP address.
Email: pink at odahoda dot de
WWW: http://pink.odahoda.de /