Menonaktifkan Daftar Direktori di Apache: Difference between revisions
Created page with "Untuk menonaktifkan daftar direktori untuk direktori tertentu, tambahkan pengaturan berikut di Apache Virtual Host atau buat file <code>.htaccess</code> di direktori itu denga..." |
No edit summary |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 3: | Line 3: | ||
===Di Apache Virtual Host=== | ===Di Apache Virtual Host=== | ||
<syntaxhighlight lang="apacheconf"> | |||
<Directory /var/www/public_html> | <Directory /var/www/public_html> | ||
Options -Indexes | Options -Indexes | ||
</Directory> | </Directory> | ||
</syntaxhighlight> | |||
===Di File .htaccess=== | ===Di File .htaccess=== | ||
<syntaxhighlight lang="apacheconf"> | |||
Options -Indexes | |||
</syntaxhighlight> | |||
Saat menggunakan .htaccess, pastikan bahwa server Apache diaktifkan untuk menggunakan file <code>.htaccess</code> untuk direktori itu. Dalam banyak kasus, <code>.htaccess</code> dinonaktifkan secara default. | Saat menggunakan .htaccess, pastikan bahwa server Apache diaktifkan untuk menggunakan file <code>.htaccess</code> untuk direktori itu. Dalam banyak kasus, <code>.htaccess</code> dinonaktifkan secara default. | ||
Terakhir, muat ulang layanan Apache setelah melakukan perubahan di Virtual host untuk menerapkan perubahan. | Terakhir, muat ulang layanan Apache setelah melakukan perubahan di Virtual host untuk menerapkan perubahan. | ||
[[Category:Tutorial]] | [[Category:Tutorial]] | ||
[[Category:Server]] | |||
[[Category:Linux]] | |||
[[Category:Apache]] | |||