How to Disable Directory listing in WordPress Hosted on Lighttpd Server

How to Disable Directory listing in WordPress Hosted on Lighttpd Server

WordPress is one of the most popular CMS with over 35% of internet website are build on WordPress CMS at this time of writing this post. There other CMS like Squarespace, Joomla, Drupal etc but use by only fewer sites. WordPress is far ahead as compared to its competitor. Previously WordPress users to create a blog or website But now WordPress core code changed a lot as well as a massive ecosystem of plugins and theme, you can create any type of website with WordPress.

How to Disable Directory listing in WordPress Hosted on Lighttpd Server

As WordPress is more popular CMS, therefore, it is the main target for a hacker. As per Sucuri WordPress accounted for 90 percent of all hacked CMS sites in 2018. WordPress is very secure by default itself most of the security breach occurs due to use of theme and plugin from unauthorized sources. on WordPress Platform website security hardening means securing a website by reducing its surface of vulnerability. More use of theme and plugin, Showing directory or WordPress version provide a potential entry point to the hacker.

How to Disable Directory listing in WordPress Hosted on Lighttpd Server

Sucuri experts blamed most of the hacks on vulnerabilities in plugins and themes, misconfiguration issues, and a lack of maintenance by webmasters, who often forgot to update their CMS, themes, and plugins.

You Website structure has a very important role for your WordPress Website security. Directory listing provides a clear cut idea about your website structure to the hacker to find a weak section of your website. By default most web servers like Apache, NGINX and LiteSpeed have directory browsing enabled.

How to Disable Directory listing in WordPress Hosted on Lighttpd ServerIn my previous post, I have explained how to Disable Directory listing on a website hosted on Apache Server. Go to path http://yoursitename.com/wp-includes/ and replace yoursitename.com with your website URL if you see below snapshot which means directory list is enabled on your WordPress website. In this post, I will explain how to disable directory browsing on WordPress website hosted on Nginx server.

How to Disable Directory Listing on Lighttpd Server-:

Directory listing is disabled by default on a Lighttpd web server. However, it is possible to disable directory listing from the dir listing.conf file if it was enabled because of a regression or configuration changes. The configuration file of the mod_dirlisting is /etc/lighttpd/conf.d/dirlisting.conf.

The configuration file of the Lighttpd web server.

To disable directory listing on the server, you must replace the related line with the following:

dir-listing.activate = “disable”

If you want to enable directory listing for a particular directory, you must make the following changes in the configuration file specifically for that directory:

$HTTP[“url”] =~ “^/download($|/)” { dir-listing.activate = “enable” }

Thanks for reading…“Pardon my grammar, English is not my native tongue.”

If you like my work, Please Share on Social Media! You can Follow WP knol on FacebookTwitterPinterest and YouTube for latest updates. You may Subscribe to WP Knol Newsletter to get latest updates via Email. You May also Continue Reading my Recent Posts Which Might Interest You.

About Amar Patel 263 Articles
Hi, I am Amar Patel from India. Founder, Author and Administrator of wpknol.com. I am a Simple Average Man who Loves life and Love living life.Professionally I am a Mechanical Engineer. Apart from my Job, I Love to write the things around WordPress WordPress CMS.