Archive for Januari, 2010

Protect sarg folder (squid) with .htacces file on centos 5.3

edit file —> vim /etc/httpd/httpd.conf

setup like this :

restart httpd –

#service httpd restart

create directory outside apache dcc root

#mkdir -p /home/secure/

create password file with htpasswd command, username indra :

#htpasswd -c /home/secure/apasswords indra

New password:

Make sure /home/secure/apasswords file is readable by Apache web server.

Now allow apache user apache to read our password file:

# chown apache:apache /home/secure/apasswords
# chmod 0660 /home/secure/apasswords

Create .htaccess file in directory sarg using text editor:

# vi /var/www/sarg

AuthType Basic
AuthName “Isi dulu broo …”
AuthUserFile /home/secure/apasswords
Require user indra

save file and exit

test your configuration :

Kategori:Linux, Tutorial