nginx config_error ai_generated true

403 Forbidden: directory index of /path/ is forbidden

ID: nginx/directory-index-forbidden

Also available as: JSON · Markdown
85%Fix Rate
88%Confidence
3Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
1 active

Root Cause

No index file found and autoindex is off.

generic

Workarounds

  1. 92% success Add index directive: index index.html index.htm
  2. 90% success Use try_files for SPA: try_files / /index.html

Dead Ends

Common approaches that don't work:

  1. Enable autoindex globally 85% fail

    Exposes directory contents, security risk

  2. Set chmod 777 on directory 92% fail

    Security vulnerability