fix: enable mod_headers and mod_expires Apache modules by default by AaronFeledy · Pull Request #244 · lando/php

@AaronFeledy

Adds .htaccess to 8.4 example that sets a custom header via mod_headers
and enables mod_expires. Both tests expected to fail since the php-apache
startup command only runs 'a2enmod rewrite'.

Refs: lando/lando#976, #243

@AaronFeledy

The php-apache startup command only enabled mod_rewrite. This meant
mod_headers and mod_expires were available in the Debian image but
never activated, causing silent failures for .htaccess directives
that depend on them (CORS headers, caching, security headers).

This affects every recipe using via: apache (Drupal, WordPress,
Laravel, Backdrop, etc).

Closes #243
Refs: lando/lando#976

@AaronFeledy changed the title test: add mod_headers and mod_expires verification tests fix: enable mod_headers and mod_expires Apache modules by default

Mar 8, 2026

@AaronFeledy

This was referenced

Mar 8, 2026