Friday, March 29, 2024
Htaccess

Proteksi direktori web dengan .htaccess

Pembuatan htacess ini tujuan nya supaya tidak sembarang orang bisa mengakses file / directori pada data web kita, sehingga bisa meminimalisasi hacking / inject sql.

Buat saja sebuah direktori yang ingin anda proteksi, kemudian letakkan file .htaccess pada direktori tersebut.

Pilih file atau folder yang ingin di proteksi.. untuk contohnya misal :

  •   kita akan memproteksi dir /administrator

Isi dari file .htaccess nya adalah sebagai berikut :

order allow,deny
deny from all

AuthType Basic

AuthUserFile /home/username/.htpasswd   >> sesuaikan dengan directori anda
AuthGroupFile /dev/null
AuthName “yuby area.. its so secure” >> sesuaikan dengan kata 2 anda sendiri

require valid-user

NB : Edit AuthUserFile /home/username/.htpasswd -> yg diatas  di edit sesuai dengan path dimana anda meletakan file htpasswd anda nantinya

Kemudian buat satu file dengan nama .htpasswd untuk membuat daftar username dan password yang dapat mengakses direktori tersebut. jangan lupa folder tempat anda meletakaan file .htpasswd harus sesuai dengan yg anda tulis di file.htaccess td –>> AuthUserFile /home/username/.htpasswd

kemudian isi file .htpasswd ->> caranya bka dulu [url=http://www.htaccesstools.com/htpasswd-generator/]htpasswd generator[/url] dan generate pass dan username yg anda inginkan. kemudian paste di dalam file .htpasswd

sebagai contoh :

admin:$apr1$eNLaA/..$.EKLbI5PRrsJfKg2rshLI1

(Visited 171 times, 1 visits today)
Baca Juga :  Cara Melindungi Website dari Httrack Website Copier

Similar Posts


Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270

Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270

Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270

Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270

Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270

Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270

Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270

Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270

Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270