element value
<html bgcolor="red">
properties
<Directory "var/www/elearning">
AuthType Basic
AuthName "Restricted Content"
AuthUserFile/etc/apache2/.htpasswd - data yg sudah diinput akan dicek
disini
Require valid-user
</Directory>
contoh :
nama file passwd : .htpasswd
lokasi : /etc/apache2
user : user1
Riquire valid-user
-> yg bisa akses hanya user yang sudah terdaftar
-> semua user yang terdaftar bisa login
Cara 2 :
membuat configurasi protek folder pada file .htaccess
data :
ServerName :elearning.tkj
DocumentRoot : /var/www/elearning
konfigurasi tambahkan :
<Directory "var/www/elearning">
// konf file yg ada disini bisa diganti file lain
AllowOverride ALL
</Directory>
//Redirect URL
->MEMINDAHKAN URL yang diakses ke URL lain
contoh :
diakses : http://elearning.tkj
redirect : http://openchart.tkj
syarat :
-pastikan module apache Rewrite on
Perintah Redirect
RewriteEngine on
RedirectMatch ^/$ http://openchart.tkj