-
Notifications
You must be signed in to change notification settings - Fork 0
/
bashtheweb.conf
53 lines (47 loc) · 1.45 KB
/
bashtheweb.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# This file MUST end in a trailing newline
# Its has an ascending priority order e.g. low -> high
# Every file (matches support regex)
[/.*]
# Try to serve a file, then directory and then 404
# bashtheweb will only serve 403's without this
ORDER="index/file/dir/404"
# Only applies to dir listings and error pages
APPEND="<hr/><p>Served by bashtheweb/%VERSION at %DATE.</p>"
INDEX="index.html index.htm"
# You can use redirects
[/redirect.*]
ORDER="redirect"
LOCATION="/"
# Static content can be served with the "static" type
[/static]
ORDER="string"
MIME="text/html"
STRING="<h2>Examples of static content</h2><a href='/static/text'>Plain Text</a><br/><a href='/static/html'>HTML</a>"
# Serving static text
[/static/text]
ORDER="string"
STRING="Static text content from the bashtheweb.conf file."
# The MIME type can be set as well
[/static/html]
ORDER="string"
MIME="text/html"
STRING="<h2>Static Text</h2><p>From the bashtheweb.conf file.</p>"
# You can also use a program instead of cat
[.*\.php]
EXTENSTIONAPI="php"
MIME="text/plain"
[.*\.pl]
EXTENSTIONAPI="perl"
MIME="text/plain"
# HTTP Basic auth works as well
[/authdemo.*]
ORDER="auth/index/file/dir/404"
REALM="To View Contents Please Authenticate"
USERNAME="123"
# Passwords can be hashed with MD5 or SHA256 or be in plain text
PWTYPE="sha256"
# "abc"
PASSWORD="ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"
# Return a 403 when people try to access this file
[.*/bashtheweb.conf]
ORDER="403"