Re: Restrict Access Virtual Host on Apache2
On Mon, Jan 05, 2009 at 05:06:25PM -0800, Jeff D wrote:
> On Tue, 6 Jan 2009, Zaki Akhmad wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > 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 22.214.171.124
> then restart apache and only hosts coming from 126.96.36.199 will be able to
> access the site..
Or similar directives in the <VirtualHost> context.
Tzafrir Cohen | firstname.lastname@example.org | VIM is
http://tzafrir.org.il | | a Mutt's
email@example.com | | best
ICQ# 16849754 | | friend