Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

Latest commit

 

History

History
57 lines (42 loc) · 3.12 KB

README.md

File metadata and controls

57 lines (42 loc) · 3.12 KB

Test build Linting Analysis and Scans Testing DeepScan grade express version GitHub Issues GitHub Pull Requests

multipool

A simple static webserver that supports multiple domains, so you don't have to set up a webserver for each domain you own.

Setup

Setting up using Docker

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.

Linux

docker run --name multidomain \
  -p 80:80 \
  -v /multidomain/content:/app/content \
  -v /multidomain/logs:/app/logs \
  ghcr.io/biaw/multidomain:latest

Windows

docker run --name multidomain ^
  -p 80:80 ^
  -v "C:\multidomain\content":/app/content ^
  -v "C:\multidomain\logs":/app/logs ^
  ghcr.io/biaw/multidomain:latest

Request workflow

  • 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.

Notes

  • <path> by default is index.html, so if you want to respond to https://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.