Guide to Configuring Directory Indexing and Parent Directory Access Restrictions in WAS
Key point
This guide explains how to disable directory indexing and restrict access to parent directories on major WAS platforms such as IIS, Apache, Tomcat, and NGINX.
Details
To build a foundation of security in the development process, this introduces methods to prevent exposure of the directory structure of WAS (Web Application Server). When directory indexing is enabled, the WAS structure, backup files, source files, and more can be exposed externally, leading to a security vulnerability.
Disabling Directory Indexing by Major WAS
Indexing should be blocked by changing settings appropriate to each server environment.
- IIS 7.0~8.0: In InetMgr.exe, change the [Directory Browsing] feature to 'Disabled'.
- Apache HTTP Server: Remove the
Indexesoption from Options in the configuration file (httpd.conf, etc.). - Tomcat: Set the
listingsparameter value of the DefaultServlet in the web.xml file tofalse. - NGINX: Change the
autoindexsetting in the nginx.conf file tooff.
Restricting Parent Directory Access and Configuring Authentication
In special cases where directory indexing must be allowed, access to the parent directory (../) should be blocked or additional authentication should be applied.
- IIS: Set [Enable Parent Paths] to
falsein the ASP properties. - Apache: Configure an authentication scheme via the
AllowOverride AuthConfigsetting and.htaccessfile. - Tomcat: Use an XSLT file to customize indexing so that only specific directories are indexed.
- NGINX: Control access by setting
return 404orauth_basicperlocationblock.
Most WAS platforms block directory indexing by default, but it is essential to check whether indexing has been unnecessarily left open during initial server environment configuration.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.