
● Disable directory listing so file indexes are not visible.
● Remove default pages, manuals and sample scripts.
● Limit HTTP methods to those the application uses.
● Reduce version information in banners and headers.
● Enforce modern transport security and redirect insecure requests.
● Set security headers consistently at the server or gateway.
Lock Down File Permissions
Improper file permissions allow small flaws to become large ones. Apply least privilege so that
the web process can read what it must and write only to designated locations. Keep
configuration files, private keys and backups outside publicly served directories and make sure
sensitive files are not worldreadable. Periodically search for files that are writable by the web
process and for stray backup or archive files in web roots.
Protect Administrative Access
Administrative interfaces such as remote shells, management consoles and control panels
should be reachable only from a management network or through a hardened access path.
Require strong authentication and multifactor verification, log every administrative session and
remove standing access that is not needed.
Application Runtime Settings That Servers Depend On
The boundary between infrastructure and application is where many errors hide. Debug mode,
error verbosity, session settings and framework management endpoints are controlled by
application configuration but affect server exposure.
Set these deliberately:
1. Debug and development features off in production.
2. Generic error responses with detailed information logged privately.
3. Secure cookie attributes for session identifiers.
4. Management and monitoring endpoints disabled, or limited to authenticated internal use.
5. Separate configuration per environment, never copied blindly from development.
Java teams should examine how management endpoints and defaults are treated in popular
frameworks; the top Spring Boot security risks article is a useful reference for the kinds of
exposure that appear when these settings are left open.