Files
zonemaster.es/zonemaster-gui/zonemaster.conf-example
Malin 8d4eaa1489 feat: add full Zonemaster stack with Docker and Spanish UI
- Clone all 5 Zonemaster component repos (LDNS, Engine, CLI, Backend, GUI)
- Dockerfile.backend: 8-stage multi-stage build LDNS→Engine→CLI→Backend
- Dockerfile.gui: Astro static build served via nginx
- docker-compose.yml: backend (internal) + frontend (port 5353)
- nginx.conf: root redirects to /es/, /api/ proxied to backend
- zonemaster-gui/config.ts: defaultLanguage set to 'es' (Spanish)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 08:19:24 +02:00

58 lines
1.8 KiB
Plaintext

<VirtualHost *:80>
# BASE_URL can be set and DEFAULT_LANGUAGE can be updated.
# Uncomment the following line *only* if the GUI is served from a
# subdirectory. The setting here must match the setting in config.ts.
# Must start with a slash, but not end with a slash.
# Define BASE_URL "/subdirectory" # Undefined by default
# Default language must be updated if "defaultLanguage" in config.ts is
# changed. Both must match.
Define DEFAULT_LANGUAGE "en"
# Nothing to set or update below. #
DirectoryIndex index.html
<IfDefine BASE_URL>
Alias ${BASE_URL} /var/www/html/zonemaster-web-gui/dist
Define API_BASE_URL "${BASE_URL}/api"
</IfDefine>
<IfDefine !BASE_URL>
DocumentRoot /var/www/html/zonemaster-web-gui/dist
Define API_BASE_URL "/api"
</IfDefine>
<Directory /var/www/html/zonemaster-web-gui/dist>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
RewriteEngine On
<IfDefine BASE_URL>
RewriteBase ${BASE_URL}/
</IfDefine>
RewriteRule ^$ /${DEFAULT_LANGUAGE} [R]
# Rewrite /result/{anything} to {default_language}/result/id/index.html
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^result/[^/]+/?$ ${DEFAULT_LANGUAGE}/result/id/index.html [L]
# Rewrite /{lang}/result/{anything} to /{lang}/result/id/index.html
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/result/[^/]+/?$ $1/result/id/index.html [L]
</Directory>
<Location "${API_BASE_URL}">
ProxyPass http://localhost:5000/
ProxyPassReverse http://localhost:5000/
ProxyPreserveHost On
</Location>
</VirtualHost>