Nginx:Mengaktifkan file listing: Difference between revisions
No edit summary |
|||
| Line 1: | Line 1: | ||
<syntaxhighlight lang="nginx" line="1"> | |||
location /somedirectory/ { | |||
autoindex on; | |||
} | |||
</syntaxhighlight> | |||
==Arahan Nginx AutoIndex== | ==Arahan Nginx AutoIndex== | ||
| Line 12: | Line 14: | ||
Contoh arahan lokasi menggunakan semua empat opsi AutoIndex bisa menyerupai yang berikut ini. | Contoh arahan lokasi menggunakan semua empat opsi AutoIndex bisa menyerupai yang berikut ini. | ||
<syntaxhighlight lang="nginx" line="1"> | |||
location /somedirectory/ { | |||
autoindex on; | |||
autoindex_exact_size off; | |||
autoindex_format html; | |||
autoindex_localtime on; | |||
} | |||
</syntaxhighlight> | |||
==Source== | ==Source== | ||
*[https://www.keycdn.com/support/nginx-directory-index keycdn.com] | *[https://www.keycdn.com/support/nginx-directory-index keycdn.com] | ||