A simple static webserver that supports multiple domains, so you don't have to set up a webserver for each domain you own.
With Docker, you don't even need to download anything. You can also slightly customize the behaviour by filling in environment variables. See the example.env
-file for more information on what you can customize.
-p YOUR_PORT:80
- The Docker image runs on port 80, but you can redirect it to whatever port you want.-v /path/to/content:/app/content
- You need a content folder for your files. Define the path here.-v /path/to/logs:/app/logs
- Logs are optional, but will help you debug. Omit this if you don't need logs.
docker run --name multidomain \
-p 80:80 \
-v /multidomain/content:/app/content \
-v /multidomain/logs:/app/logs \
ghcr.io/biaw/multidomain:latest
docker run --name multidomain ^
-p 80:80 ^
-v "C:\multidomain\content":/app/content ^
-v "C:\multidomain\logs":/app/logs ^
ghcr.io/biaw/multidomain:latest
- 200
/content/<domain>/<path>
- 200
/content/_common/<path>
- 404
/content/<domain>/404.html
- 404
/content/_common/404.html
- 404 status without content
tl;dr: It will try the domain folder first. If it doesn't exist then it will try the common folder. If it doesn't exist then it will try the domain folder's 404.html. If it doesn't exist then it will try the common folder's 404.html. If it doesn't exist then it will just return a plain 404 status without any content.
<path>
by default isindex.html
, so if you want to respond tohttps://example.com/
then have a file at/content/example.com/index.html
- if a file is, for example,
redirect: http://google.com
then it will redirect to google.com.