blob: 06a9c26c7c7ee5d3f0ba8b938bc239b5b203f78c (
plain) (
blame)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
# lines that start with # are skipped
name website.com # name of the server. the # isnt really needed here as the config reader skips to the next line once it reads the needed value
port 80 # port the server will be running on
backlog 15 # backlog for the socket
logs {
# adds logging (for all processes) to specified files, and can turn logging to stderr off (0) or on (not 0)
# log level log file read mode
# only w or a permitted as read more (same read modes as fopen)
# INFO loginfo.txt w
ERROR stderr 0
ERROR stderr 1
# ERROR stderr 144
}
root /home/user/server/ # where the server will look for files, basically files prefix
bundle /ca/bundle/location # location of ca bundle
cert ssl/cert.pem # location of certificate
key ssl/key.pem #location of private key
http # turns https off
# https # turns https on
ipv4 # ipv4 enabled
ipv6 # ipv6 enabled
rewrites {
/ test/monch.gif
/media/* localc/media/$1
/* test/$1
}
# rewrites rewrites.txt # file from where to read rewrites
types mime.types # file from where to read types
types {
# reading types from config directly
# description extension
type/ext ext
}
# HTTP method rules
# not implemented yet
# GET {
# # request document to server code to server
# / homepage.html 200
# /help help.html 200
# /* 404.html 404
# }
# same but for different method
# POST {
# # etc
# }
# custom methods
# * {
# /* / 501
# }
# HTTP response codes
# codes {
# # code code text
# 200 "OK"
# 404 "Not Found"
# 418 "I'm a teapot"
# 501 "Not implemented"
# # custom codes
# 711 "Double gulp cup"
# }
# same but can also be gotten from file
# codes codes.txt
|