Re: Restrict Access Virtual Host on Apache2
On Tue, 6 Jan 2009, Zaki Akhmad wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Tue, Jan 6, 2009 at 8:06 AM, Jeff D wrote:
>
> > you could add something like this to your vhost conf:
> >
> > Order Deny,Allow
> > Deny from all
> > Allow from 1.2.3.4
> >
>
> I am using Apache 2, so I add on sites-availabe directory
>
>
> ServerAdmin za@design.paume.itb.ac.id
> ServerName blaba.zup-zup.xxx.ac.id
> DocumentRoot /var/lib/mediawiki
>
> Order Deny,Allow
> Deny from all
> Allow from x.x.x.x/16
>
> LogLevel warn
> ErrorLog /var/log/apache2/error-wiki.log
> CustomLog /var/log/apache2/access-wiki.log common
>
> ServerSignature Off
>
>
>
> But then when I reload it....
> # /etc/init.d/apache2 reload
> Syntax error on line 6 of /etc/apache2/sites-enabled/wiki:
> order not allowed here
> ...fail!
>
> :(
>
> - --
> Zaki Akhmad
try changing it to:
<Directory "/var/lib/mediawik/" >
Order Deny,Allow
Deny from all
Allow from x.x.x.x/16
</Directory>
--
8 out of 10 Owners who Expressed a Preference said Their Cats Preferred Techno.
Reply to: