From 01ef626653e20b6e60a179f908dfbc786ff53589 Mon Sep 17 00:00:00 2001 From: Aaron Feledy Date: Sat, 7 Mar 2026 17:02:08 -0600 Subject: [PATCH 1/3] test: add mod_headers and mod_expires verification tests Adds .htaccess to 2.4 example that sets a custom header via mod_headers and enables mod_expires. Adds verification commands to README that check for these in curl responses. These tests are expected to fail initially: - mod_headers: loaded but may be affected by unclosed in httpd.conf - mod_expires: not loaded at all (commented out in httpd.conf) Refs: lando/lando#976, #2 --- examples/2.4/.htaccess | 8 ++++++++ examples/2.4/README.md | 6 ++++++ 2 files changed, 14 insertions(+) create mode 100644 examples/2.4/.htaccess diff --git a/examples/2.4/.htaccess b/examples/2.4/.htaccess new file mode 100644 index 0000000..a26e080 --- /dev/null +++ b/examples/2.4/.htaccess @@ -0,0 +1,8 @@ + + Header set X-Lando-Test "blazes" + + + + ExpiresActive On + ExpiresDefault "access plus 1 hour" + diff --git a/examples/2.4/README.md b/examples/2.4/README.md index 92a3203..37a621a 100644 --- a/examples/2.4/README.md +++ b/examples/2.4/README.md @@ -30,6 +30,12 @@ lando exec curl -- curl http://defaults | grep ROOTDIR # Should only serve over http by default lando exec curl -- curl https://defaults || echo $? | grep 7 + +# Should have mod_headers enabled and working +lando exec curl -- curl -sI http://defaults | grep -i "X-Lando-Test: blazes" + +# Should have mod_expires enabled and working +lando exec curl -- curl -sI http://defaults | grep -i "Expires:" ``` ## Destroy tests From 2271c140b73a67d0d9d2d5024b4dbc289daa2a69 Mon Sep 17 00:00:00 2001 From: Aaron Feledy Date: Sat, 7 Mar 2026 18:08:26 -0600 Subject: [PATCH 2/3] fix: enable mod_expires and close unclosed IfModule tag --- config/httpd.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/httpd.conf b/config/httpd.conf index 3397b7c..c436726 100644 --- a/config/httpd.conf +++ b/config/httpd.conf @@ -113,7 +113,7 @@ LoadModule log_config_module modules/mod_log_config.so #LoadModule log_debug_module modules/mod_log_debug.so #LoadModule logio_module modules/mod_logio.so LoadModule env_module modules/mod_env.so -#LoadModule expires_module modules/mod_expires.so +LoadModule expires_module modules/mod_expires.so LoadModule headers_module modules/mod_headers.so #LoadModule unique_id_module modules/mod_unique_id.so LoadModule setenvif_module modules/mod_setenvif.so @@ -518,3 +518,4 @@ IncludeOptional /opt/bitnami/apache/conf/vhosts/*.conf RequestHeader unset Proxy + From 1d55360c9c11148e11ebf8de35b70507ade4b925 Mon Sep 17 00:00:00 2001 From: Aaron Feledy Date: Sat, 7 Mar 2026 19:12:03 -0600 Subject: [PATCH 3/3] chore: add changelog entry --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54d4256..82c5c07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }}) +* Enabled `mod_expires` Apache module by default [lando/lando#976](https://github.com/lando/lando/issues/976) +* Fixed unclosed `` tag in `httpd.conf` * Updated `@lando/argv` to `1.2.0` * Updated `lodash` to `4.17.23` * Updated `lodash-es` to `4.17.23`