[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Restrict Access Virtual Host on Apache2

On Tue, 6 Jan 2009, Zaki Akhmad wrote:

> Hash: SHA1
> Hello,
> I am trying to restrict access on one of my virtual host which is
> running on Apache2 web server. What should I do so that only specific
> IP can access this virtual host?

you could add something like this to your vhost conf:
<Directory /path/to/vhost/dir >
    Order Deny,Allow
    Deny from all
    Allow from

then restart apache and only hosts coming from will be able to
access the site..

8 out of 10 Owners who Expressed a Preference said Their Cats Preferred Techno.

Reply to: