mirror of
https://github.com/3lswear/webserv.git
synced 2025-10-28 21:07:59 +03:00
ADD configuration
This commit is contained in:
@@ -1,39 +1,40 @@
|
|||||||
[[server]]
|
[[server]]
|
||||||
name = "serv1"
|
name = ["jopa.com", "popa.org"]
|
||||||
host = "127.0.0.1"
|
host = "127.0.0.1"
|
||||||
port = 8080
|
port = 8080
|
||||||
error_page = "error.html"
|
[server.error_page]
|
||||||
|
404 = "/var/www/html/error_404.html"
|
||||||
|
405 = "/var/www/html/error_405.html"
|
||||||
body_size_limit = 10
|
body_size_limit = 10
|
||||||
[[server.location]]
|
[[server.location]]
|
||||||
|
redirect = [301, "http://localhost/secret"]
|
||||||
location = "/"
|
location = "/"
|
||||||
# redirection ???
|
root = "/var/www/html/"
|
||||||
root = "/var/www/html/jopa.html"
|
|
||||||
methods = ["GET", "POST"]
|
methods = ["GET", "POST"]
|
||||||
directory_list = true
|
autoindex = true
|
||||||
directory_fallback = "its_a_directory.html"
|
directory_file = "its_a_directory.html"
|
||||||
upload_accept = true
|
upload_accept = true
|
||||||
upload_dir = "/var/www/html/upload"
|
upload_dir = "/var/www/html/upload"
|
||||||
|
|
||||||
[[server.location]]
|
[[server.location]]
|
||||||
location = "/secret/"
|
location = "/secret"
|
||||||
root = "/var/www/html/secret.html"
|
root = "/var/www/html/secret.html"
|
||||||
methods = ["GET"]
|
methods = ["GET"]
|
||||||
directory_list = false
|
autoindex = false
|
||||||
directory_fallback = "oops.html"
|
directory_file = "oops.html"
|
||||||
|
|
||||||
[[server]]
|
[[server]]
|
||||||
name = "2222"
|
name = "2222"
|
||||||
host = "10.0.0.1"
|
host = "10.0.0.1"
|
||||||
port = 8081
|
port = 8081
|
||||||
error_page = "error2.html"
|
|
||||||
body_size_limit = 10
|
body_size_limit = 10
|
||||||
[[server.location]]
|
[[server.location]]
|
||||||
location = "/root2/"
|
location = "/root2/"
|
||||||
# redirection ???
|
# redirection ???
|
||||||
root = "/var/www/html/jopa.html"
|
root = "/var/www/html/jopa.html"
|
||||||
methods = ["GET", "POST"]
|
methods = ["GET", "POST"]
|
||||||
directory_list = true
|
autoindex = true
|
||||||
directory_fallback = "its_a_directory.html"
|
directory_file = "its_a_directory.html"
|
||||||
upload_accept = false
|
upload_accept = false
|
||||||
upload_dir = "/var/www/html/upload"
|
upload_dir = "/var/www/html/upload"
|
||||||
|
|
||||||
@@ -41,5 +42,5 @@
|
|||||||
location = "/secret2/"
|
location = "/secret2/"
|
||||||
root = "/var/www/html/secret.html"
|
root = "/var/www/html/secret.html"
|
||||||
methods = ["GET"]
|
methods = ["GET"]
|
||||||
directory_list = false
|
autoindex = false
|
||||||
directory_fallback = "oops.html"
|
directory_file = "oops.html"
|
||||||
|
|||||||
Reference in New Issue
Block a user