How do I prevent directory contents from being listed?

Updated -

For Apache, there are two ways to prevent directory contents from being listed.

The first method is to place an index file within the directory. Give it a name as index.html, index.htm, main.html, or main.htm. When visitors go to that directory (for example: http://example.com/directoy), instead of seeing a list of all the...

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content