Fixed multiple port support and improved it

This commit is contained in:
2022-06-28 07:57:15 -05:00
parent 47cf044858
commit d843ffab93
8 changed files with 119 additions and 23 deletions

BIN
site/library.so Executable file

Binary file not shown.

1
site/site/shared.html Normal file
View File

@@ -0,0 +1 @@
<p>This page is accessible on ports 8000 and 8001.</p>

View File

@@ -30,15 +30,13 @@ read /blog/.* site/blog/
linked /library
# The path /library should be dynamically loaded from the library (library.so)
set host 127.0.0.1:8000
# The following pages will respond to the host 127.0.0.1:8000
set host .*
# The following pages will respond to the host .* (any host)
read / site/easteregg.html
# The path / should be read from site/easteregg.html
read /egg.png site/egg.png
# The path /egg.png should be read from site/egg.png
set host .*
# The following pages will respond to all hosts (regex)
read /alldomains site/alldomains.html
# The path /alldomains should be read from /site/alldomains.html
@@ -47,3 +45,7 @@ set port 8001
read / site/8001.html
# The path / should be read from site/8001.html
set port 8000,8001
read /shared site/shared.html