legacy-knowledge-base
Publicado Jul. 25, 2002

Enabling Directory Indexing for Documents and Media

written-by

Laura Li

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

Issue

  • Can we enable directory indexing for the whole Liferay instance (or for individual sites)?

Environment

  • Liferay DXP

Resolution

Directory indexing is disabled in DXP by default, as if directory indexing is enabled, document libraries are browsable through the URL for anyone with default Document Library permissions (and not just site admins). This is typically a security concern, and therefore Liferay does not recommend enabling directory indexing in most cases.

If your team stores documents that do not require permissions checks, Liferay offers two methods to enable directory indexing:

  1. All Sites: Set this property to true in portal-ext.properties to enable directory indexing for every site in your bundle (generally not recommended). Its default value is false:
    web.server.servlet.directory.indexing.enabled
  2. Specific Sites: Toggle "Enable Directory Indexing" directly for individual sites in Site Settings:
    1. Find the setting:
      1. DXP 7.4+: From the Site Menu, go to Configuration → Site Settings, then click Documents and Media in the Content & Data section
      2. Earlier versions: From the Site Menu, go to Configuration → Settings, and expand the Documents and Media section under General
    2. Toggle Enable Directory Indexing
    3. Click Save
did-this-article-resolve-your-issue

legacy-knowledge-base