This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/attic-docker.git
The following commit(s) were added to refs/heads/main by this push:
new 4db64f2 Revert, until better method found to set http server hostname
4db64f2 is described below
commit 4db64f2d89f391a9c447bf4ced7f63af2dea6e10
Author: Sebb <[email protected]>
AuthorDate: Sun Oct 5 21:53:13 2025 +0100
Revert, until better method found to set http server hostname
---
compose.yaml | 2 ++
scripts/attic_filter.lua | 6 ++++++
2 files changed, 8 insertions(+)
diff --git a/compose.yaml b/compose.yaml
index 8ded21c..efd3978 100644
--- a/compose.yaml
+++ b/compose.yaml
@@ -13,5 +13,7 @@ services:
- ${VAR_HTML:-./_docker/www}:/var/www/site.apache.org
- ${VAR_LOG:-./_docker/log}:/var/log/apache2
environment:
+ # Pass in site name
+ - VAR_NAME=${VAR_NAME:-localhost}
# Act as though _ATTIC directory is present (if yes)
- VAR_ATTIC=${VAR_ATTIC:-no}
diff --git a/scripts/attic_filter.lua b/scripts/attic_filter.lua
index 8c54c05..1e52eb4 100644
--- a/scripts/attic_filter.lua
+++ b/scripts/attic_filter.lua
@@ -37,6 +37,12 @@ function output_filter(r)
-- get TLP part of hostname
local host = r.hostname:match("^([^.]+)")
+ -- Allow override of host name
+ if host == 'localhost'
+ then
+ host = os.getenv('VAR_NAME') or 'unknown'
+ end
+
-- create the customised banner
local divstyle =
'font-size:x-large;padding:15px;color:white;background:red;z-index:99;' ;
local astyle = 'color:white;text-decoration:underline' ;