mirror of
https://github.com/3lswear/webserv.git
synced 2025-10-28 21:07:59 +03:00
feat: add example config file
This commit is contained in:
@@ -1,46 +1,8 @@
|
|||||||
[[server]]
|
[[server]]
|
||||||
name = ["jopa.com", "popa.org"]
|
|
||||||
host = "127.0.0.1"
|
host = "127.0.0.1"
|
||||||
port = 8080
|
port = 8080
|
||||||
body_size_limit = 10
|
|
||||||
[server.error_page]
|
|
||||||
400 = "error_400.html"
|
|
||||||
401 = "error_401.html"
|
|
||||||
[[server.location]]
|
[[server.location]]
|
||||||
redirect = ["301", "http://localhost/secret"]
|
|
||||||
location = "/"
|
location = "/"
|
||||||
root = "/var/www/html/"
|
root = "www/def"
|
||||||
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"]
|
methods = ["GET"]
|
||||||
autoindex = false
|
directory_file = "index.html"
|
||||||
directory_file = "oops.html"
|
|
||||||
|
|
||||||
[[server]]
|
|
||||||
name = "2222"
|
|
||||||
ip = "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"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user