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:
- 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 - Specific Sites: Toggle "Enable Directory Indexing" directly for individual sites in Site Settings:
- Find the setting:
- DXP 7.4+: From the Site Menu, go to Configuration → Site Settings, then click Documents and Media in the Content & Data section
- Earlier versions: From the Site Menu, go to Configuration → Settings, and expand the Documents and Media section under General
- Toggle Enable Directory Indexing
- Click Save
- Find the setting: