Files
webserv/config/example.toml
2022-01-20 22:40:19 +03:00

47 lines
1.1 KiB
TOML

[[server]]
name = ["jopa.com", "popa.org"]
host = "127.0.0.1"
port = 8080
[server.error_page]
404 = "/var/www/html/error_404.html"
405 = "/var/www/html/error_405.html"
body_size_limit = 10
[[server.location]]
redirect = [301, "http://localhost/secret"]
location = "/"
root = "/var/www/html/"
methods = ["GET", "POST"]
autoindex = true
directory_file = "its_a_directory.html"
upload_accept = true
upload_dir = "/var/www/html/upload"
[[server.location]]
location = "/secret"
root = "/var/www/html/secret.html"
methods = ["GET"]
autoindex = false
directory_file = "oops.html"
[[server]]
name = "2222"
host = "10.0.0.1"
port = 8081
body_size_limit = 10
[[server.location]]
location = "/root2/"
# redirection ???
root = "/var/www/html/jopa.html"
methods = ["GET", "POST"]
autoindex = true
directory_file = "its_a_directory.html"
upload_accept = false
upload_dir = "/var/www/html/upload"
[[server.location]]
location = "/secret2/"
root = "/var/www/html/secret.html"
methods = ["GET"]
autoindex = false
directory_file = "oops.html"