Hardening the host
This page is for the infrastructure and security teams of a public body who prepare and assess the server that runs an Exponential site. It answers which hardening the software expects from the host, how to check each layer, and how to present the result in a security assessment. The reference is Chapter 13: Security hardening; the application side is Security hardening and Security standards. Hosting companies have their own version: Hardening for hosts.
Contents
- Secure by default, verified by you
- The layers and their checks
- File modes and owners
- Secrets on the server
- Mapping to your security baseline
- Checklist
Secure by default, verified by you
Since September 2026 a default installation sends security headers, uses HttpOnly and SameSite session cookies and
answers 404 for dot files and PHP files below the document root (Security and audit).
Verify these instead of trusting them; the checks below take a few minutes and their output is good evidence for an
assessment file.
The layers and their checks
| Layer | What to check | Command or source |
|---|---|---|
| Served files | .env, .git/config and extension PHP files answer 404 | the curl loop below; 13.2 |
| Security headers | five headers on every page | curl -sI; 13.9 |
| HTTPS | every name served over HTTPS; HSTS only when that is permanent | TLS and HTTPS |
| Debug output | off, or only for listed addresses with an expiry | 13.4 |
| The administration | its own host name and network restriction | Separating the administration from the public site |
| The setup wizard | closed: CheckValidity=false in settings/override/site.ini.append.php | 13.5 |
| Velocity | workers not root, panel password set, dashboard not remote | 13.12 |
| Keeping up to date | security releases applied | Security updates and disclosure |
curl -sI https://www.example.gov/ | grep -i -E 'x-content-type|x-frame|referrer|permissions|content-security'
for p in .env .git/config extension/expservices/ezinfo.php; do
curl -s -o /dev/null -w "$p %{http_code}\n" https://www.example.gov/$p
doneExpected: the five headers (x-content-type-options, x-frame-options, content-security-policy,
referrer-policy, permissions-policy), and 404 three times (Security and audit).
File modes and owners
The site creates logs, caches and storage as open as site.ini [FileSettings] and the code ask, which is 0777 and
0666 by default. On a production server set limits in config.php, so nothing new is readable or writable by other
accounts:
define( 'EZP_DIR_MODE_MAX', 0750 );
define( 'EZP_FILE_MODE_MAX', 0640 );Then narrow what already exists once (File modes). Run the web server's PHP,
Velocity's workers, cronjobs and command line scripts as one user, or give them a common group with setgid
directories; two users writing the same files is the most common cause of odd failures
(Writable directories and permissions). After any
command run as root, check the owner of new files in var/.
Secrets on the server
settings/override/ holds the database password, the audit trail's signing and pseudonym keys and the mail preference
secret (13.3). Limit who can read it on
the server, keep it out of version control or encrypt it there, and treat backups that contain it as sensitive (see
Keys and secrets in backups). Velocity keeps private keys of
certificates in its configuration tree with mode 0600.
Mapping to your security baseline
Public bodies often assess applications against a national baseline, an ISO/IEC 27001 control set (ISO/IEC 27001), the NIST Cybersecurity Framework 2.0 or, in the EU, measures taken under the NIS2 Directive. Exponential does not claim certification against any of them. What helps:
- Security standards maps the software to the OWASP Top 10 and OWASP ASVS, with honest "Partly complies" and "Unverified" statuses and the known gaps (for example account lockout off by default and a minimum password length of 10, below ASVS level 1's 12).
- The checks on this page produce evidence you can file with the assessment.
- The audit trail records settings writes, cache clears and deploys, which supports change and access controls (Audit trail).
Checklist
- To do: The served-files and header checks pass, with output filed.
- To do: HTTPS everywhere; HSTS decided deliberately.
- To do: Debug output off on production.
- To do:
EZP_DIR_MODE_MAXandEZP_FILE_MODE_MAXset; one user or one group writesvar/. - To do:
settings/override/readable only by the site's user and administrators. - To do: The setup wizard is closed and the administration restricted.
- To do: The gaps listed in Security standards are reviewed and decided.
Related pages
- Hosting index of this folder
- Security review checklist
- Request-shield and request rules
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.