Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,150 of 9,150 pages
About the help in other languages
All help pages

Hardening the host

For public-sector IT and security teams preparing a server for an Exponential site. The hardening layers the software expects from the host, the checks that prove them, and how to map them to a security baseline or an…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/government/operations/hosting/hardening-the-host.md

On this page

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

  1. Secure by default, verified by you
  2. The layers and their checks
  3. File modes and owners
  4. Secrets on the server
  5. Mapping to your security baseline
  6. 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

LayerWhat to checkCommand or source
Served files.env, .git/config and extension PHP files answer 404the curl loop below; 13.2
Security headersfive headers on every pagecurl -sI; 13.9
HTTPSevery name served over HTTPS; HSTS only when that is permanentTLS and HTTPS
Debug outputoff, or only for listed addresses with an expiry13.4
The administrationits own host name and network restrictionSeparating the administration from the public site
The setup wizardclosed: CheckValidity=false in settings/override/site.ini.append.php13.5
Velocityworkers not root, panel password set, dashboard not remote13.12
Keeping up to datesecurity releases appliedSecurity 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
done

Expected: 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_MAX and EZP_FILE_MODE_MAX set; one user or one group writes var/.
  • 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.

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.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x