Beranda > Linux, Tutorial > Protect sarg folder (squid) with .htacces file on centos 5.3

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 :

Iklan
Kategori:Linux, Tutorial
  1. Belum ada komentar.
  1. No trackbacks yet.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: