Prevent Directory Listing in Lighttpd

How to prevent files under wp-content/uploads to be listed in the browser? It is actually a one-liner under Lighttpd (lighty).

Edit /etc/lighttpd/lighttpd.conf and change server.dir-listing into disable.

 server.dir-listing          = "disable"

If you choose to enable directory listing, you can set the encoding of the file names to be displayed:

 dir-listing.encoding        = "utf-8"

There are wonderful resources about lighty in the following two sites: Flexion.Org and Calomel.org

Leave a Reply

Your email address will not be published. Required fields are marked *