Website root redirect

The issue I am facing:

I'm trying to figure out a way to make website root https://<domain>/ redirect to a container on port 8080
The idea is to change '/' to a redirect to the port

I've seen in webserver docs some examples that seems to hint that this is possible.
But the examples don't specify WHERE should those file be.

Details about my system:
My installation is on a dedicated RPi 4 using pihole as DHCP as well
with unbound installed.

No, before you ask, pihole is not running in a container but straight on host machine.
This install is ancient and was progressively updated from v3 over the years

What I have changed since installing Pi-hole:
Relevant for this discussion is setting webserver.serve_all to true as per instruction in the docs, and created index.html in /var/www/html to try to figure it out on my own.
Unfortunately webserver simply serves what ever is in that file.
not even " <p><?= 1+1 ?></p>" from examples seems to work, IF that was the intended functionality.

edited for escaping characters

You need to configure a reverse proxy. Pi-hole web server can't redirect like this.

Which OS version are you using? Are you running Pi-hole v6 on an older OS?

To answer all needed questions, please generate a debug log (sudo pihole -d), upload it when asked and post here just the token URL that is generated after the log is uploaded.

Apparently you are mixing things...

You created a HTML file (index.html).
This file is considered a pure HTML file, but you also added Lua code to this file.

The web server will never execute Lua code in HTML files. The result is: the code will be considered plain text.

If you want to execute Lua code, your file needs .lp extension.

Rename the file to index.lp.

Solved.
And yes redirect works.

file contents for future reference (index.lp):

HTTP/1.0 301
Location: http://<domain>:8080

I simply never tried *.lp because from days of lighttpd only files allowed were index.html and index.php

Ohhh... I misunderstood your needs.

You just need the page to redirect to another website.
Than a simple HTTP redirect will do it.