you have several options.
1. you can restrict users with username/passwd
2. you can restrict ip/name address.

any way you need to go to the access.conf of the apache webserver and to add
something like :

for example no.1

<Directory /YOUR_WEB_DIRECTORY>
Options Indexes FollowSymLinks +Includes ExecCGI
AllowOverride AuthConfig
</Directory>

Indexes - means that you will be able to brows the dir.
FollowSymlink - if toy have a link then it supposed to follow it (i think
that the actual file need to be under the web server directories !)
+Includes - it is for SHTML files and TAGS.
EexecCGI - To be able to run CGI in those dirs.

AllowOverride AuthConfig - This is the actual way to block the directory.
 you will need to put a file called .htaccess in the root dir of the
directory that you want to block.
the file looks like this :

AuthUserFile /LOCATION_WHERE_TO_PUT_PASSWD_FILE
AuthGroupFile /dev/null # - the location of the group file
AuthName ByPassword
AuthType Basic
<Limit GET>
require user USERNAME
</Limit>

In order to create a passwd file you need to do htpasswd -c
/LOCATION_OF_THE_PASSWD_FILE USERNAME.


for example no.2 :

<Directory /YOUR_WEB_DIRECTORY>
Options Indexes FollowSymLinks +Includes ExecCGI
AllowOverride none
order allow,deny
allow from XXX.XXX.XXX.XXX
deny from all
</Directory>

in that case you write in the XXX.XXX.XXX.XXX the ip address or DNS name of
the station you want to give access to.


Ofcourse you can use both of the techniqes together.


If you need more info please contact me in private.


Mike


----- Original Message -----
From: "Hetz Ben Hamo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 28, 2000 11:21 AM
Subject: blocking part of web site


> Hi,
>
> I have here our very small mini web site which I'm putting there some anti
> virus updates and stuff like that - and it's on /home/httpd
>
> Now, the managment asks me here to add a folder which will be accessible
to
> only few people here...
>
> My question - how do I do this? which files do I need to change or add
(and
> please - give details as much as u can - and if u got an example - thats
> even better)..
>
> One more thing - does any1 here got a "powered by Linux" logo link? I want
> to stick it there.. :)
>
> Thanks
> Hetz
>
> -------------------------
> Hetz Ben Hamo
> Sys. Admin.
> Intercomp
>
> http://www.cobol2java.com
>
>
> =================================================================
> To unsubscribe, send mail to [EMAIL PROTECTED] with
> the word "unsubscribe" in the message body, e.g., run the command
> echo unsubscribe | mail [EMAIL PROTECTED]
>
>


=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to