Skip to content

DnsWebService: add DNS_SERVER_WEB_SERVICE_WWW_FOLDER_PATH to configure the web root folder - #2138

Open
byGarcia wants to merge 2 commits into
TechnitiumSoftware:developfrom
byGarcia:feat/configurable-www-folder
Open

DnsWebService: add DNS_SERVER_WEB_SERVICE_WWW_FOLDER_PATH to configure the web root folder#2138
byGarcia wants to merge 2 commits into
TechnitiumSoftware:developfrom
byGarcia:feat/configurable-www-folder

Conversation

@byGarcia

@byGarcia byGarcia commented Sep 7, 2026

Copy link
Copy Markdown

The web root is fixed at www next to DnsServerApp.dll, so anything that replaces the web console is lost on the next update: the installer extracts the release over the installation folder and puts its own www back.

This adds an environment variable to point the web service at a different folder, so a replaced console can live outside the installation folder and survive updates.

What it does

  • DNS_SERVER_WEB_SERVICE_WWW_FOLDER_PATH overrides the web root folder.
  • Unset: <app folder>/www is used, exactly as before.
  • Set to a folder that does not exist: the server writes a log line saying so and falls back to the default, so it always starts.
  • Documented in DockerEnvironmentVariables.md, with a note — unlike the other variables listed there, this one is not stored in the DNS config file, so it is read on every start rather than only on the first one.

Two files, 15 lines added. No API change, no config file change, and no behaviour change at all when the variable is not set.

Verified

Built from this branch — DnsServerApp published and an image built with the repository's own Dockerfile — and run:

  • variable unset: the stock console is served, as before;
  • variable pointing at an existing folder: that folder is served;
  • variable pointing at a missing folder: the log line appears and the default folder is served.

Context

This is the piece that the installable alternative GUI you suggested in #2128 needs. With it, installing one does not mean overwriting www, and a server update does not silently restore the stock console on top of it.

I agree to the copyright and IPR transfer set out in CONTRIBUTING.md for this contribution.

…ironment variable to allow overriding the web service web root folder. Falls back to the default folder when the variable is unset or when the configured folder does not exist so that the server always starts.
…_FOLDER_PATH environment variable. Added a note since, unlike the other variables, it is not stored in the DNS config file and is therefore read on every start.
@byGarcia byGarcia closed this Sep 7, 2026
@byGarcia byGarcia reopened this Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant