How to disable directory listing

I’ve just searched for this approach but there are so many complex tips for this simple task.. So, in this article I’ll show you how to disable directory index in Apache web server.

Imagine, that you have a virtual host:

<VirtualHost *:80>
...
VirtualHost>

To disable directory listing you should add this line of code:

<VirtualHost *:80>
...
Options -Indexes
VirtualHost>

It works!

By the way, I tryed to remove Options directive but the directory listing wasn’t disabled.