mirror of
https://github.com/3lswear/webserv.git
synced 2025-10-28 04:48:00 +03:00
Merge remote-tracking branch 'origin/fara' into roman
This commit is contained in:
77
config/def.toml
Normal file
77
config/def.toml
Normal file
@@ -0,0 +1,77 @@
|
||||
[[server]]
|
||||
name = "localhost"
|
||||
host = "127.0.0.1"
|
||||
port = 8080
|
||||
body_size_limit = 100
|
||||
[server.error_page]
|
||||
403 = "www/def/errorFolder/error_403.html"
|
||||
404 = "www/def/errorFolder/error_404.html"
|
||||
405 = "www/def/errorFolder/error_405.html"
|
||||
[[server.location]]
|
||||
location = "/"
|
||||
root = "www/def/"
|
||||
methods = ["GET"]
|
||||
autoindex = true
|
||||
directory_file = "index.html"
|
||||
[[server.location]]
|
||||
location = "/put_file"
|
||||
root = "www/def/upload"
|
||||
body_size_limit = 1000000000
|
||||
methods = ["PUT", "GET"]
|
||||
autoindex = true
|
||||
upload_dir = "www/def/upload/"
|
||||
upload_accept = true
|
||||
[[server.location]]
|
||||
location = "/delete_file"
|
||||
root = "www/def/upload"
|
||||
methods = ["DELETE"]
|
||||
[[server.location]]
|
||||
location = "/docs"
|
||||
root = "www/def/docs"
|
||||
methods = ["GET"]
|
||||
autoindex = true
|
||||
[[server.location]]
|
||||
location = "/document"
|
||||
redirect = ["301", "http://localhost:8080/docs/$request_file"]
|
||||
[[server.location]]
|
||||
location = "/cgi-bin"
|
||||
root = "www/def/script"
|
||||
methods = ["GET", "POST"]
|
||||
directory_file = "cgi_default.html"
|
||||
[[server.location]]
|
||||
location = "*.php"
|
||||
cgi_pass = "/bin/php-cgi"
|
||||
[[server.location]]
|
||||
location = "/script"
|
||||
redirect = ["301", "http://localhost:8080/cgi-bin/$request_file"]
|
||||
[[server.location]]
|
||||
location = "*.jpeg"
|
||||
root = "www/def/images/jpegImg"
|
||||
methods = ["GET"]
|
||||
[[server.location]]
|
||||
location = "*.png"
|
||||
root = "www/def/images/pngImg"
|
||||
methods = ["GET"]
|
||||
[[server]]
|
||||
name = "pohek1.org"
|
||||
host = "127.0.0.1"
|
||||
port = 8080
|
||||
body_size_limit = 100
|
||||
[server.error_page]
|
||||
404 = "www/def/errorFolder/error_404.html"
|
||||
[[server.location]]
|
||||
location = "/"
|
||||
root = "www/def/"
|
||||
methods = ["GET"]
|
||||
directory_file = "index.html"
|
||||
[[server.location]]
|
||||
location = "/cgi-bin"
|
||||
root = "www/def/script"
|
||||
methods = ["GET", "POST"]
|
||||
directory_file = "cgi_default.html"
|
||||
[[server.location]]
|
||||
location = "*.php"
|
||||
cgi_pass = "/bin/php-cgi"
|
||||
[[server.location]]
|
||||
location = "/script"
|
||||
redirect = ["301", "http://localhost:8080/cgi-bin"]
|
||||
@@ -4,18 +4,18 @@
|
||||
port = 8080 # check num, (0, 65536)
|
||||
body_size_limit = 10000000 #(pofig and > 0)
|
||||
[server.error_page]
|
||||
"404" = "www/errorFolder/error_404.html" # throw exception if not string
|
||||
"404" = "www/real/errorFolder/error_404.html" # throw exception if not string
|
||||
[[server.location]]
|
||||
location = "/" # mandatory
|
||||
root = "www/" # check valid
|
||||
root = "www/real/" # check valid
|
||||
methods = ["GET", "POST", "DELETE"]
|
||||
autoindex = true #check if bool
|
||||
directory_file = "index.html"
|
||||
upload_accept = true #throw exception if not bool
|
||||
upload_dir = "www/upload" # check valid
|
||||
upload_dir = "www/real/upload" # check valid
|
||||
[[server.location]]
|
||||
location = "/images"
|
||||
root = "www/images"
|
||||
root = "www/real/images"
|
||||
methods = ["GET"]
|
||||
autoindex = true
|
||||
[[server.location]]
|
||||
@@ -26,20 +26,20 @@
|
||||
redirect = ["301", "http://127.0.0.1:8080/168.png"]
|
||||
[[server.location]]
|
||||
location = "*.jpeg"
|
||||
root = "www/images/jpegImg"
|
||||
root = "www/real/images/jpegImg"
|
||||
methods = ["GET", "PUT"]
|
||||
[[server.location]]
|
||||
location = "*.png"
|
||||
root = "www/images/pngImg"
|
||||
root = "www/real/images/pngImg"
|
||||
methods = ["GET"]
|
||||
[[server.location]]
|
||||
location = "/errorFolder"
|
||||
root = "www/errorFolder"
|
||||
root = "www/real/errorFolder"
|
||||
methods = ["GET", "POST"]
|
||||
autoindex = true
|
||||
[[server.location]]
|
||||
location = "*.php"
|
||||
root = "www/script"
|
||||
root = "www/real/script"
|
||||
autoindex = false
|
||||
cgi_pass = "/usr/bin/php-cgi" #check valid
|
||||
[[server]]
|
||||
@@ -59,7 +59,7 @@
|
||||
autoindex = true
|
||||
directory_file = "index.html"
|
||||
upload_accept = false
|
||||
upload_dir = "www/upload"
|
||||
upload_dir = "www/real/upload"
|
||||
[[server]]
|
||||
name = "localhost"
|
||||
host = "127.0.0.1"
|
||||
@@ -77,4 +77,4 @@
|
||||
autoindex = true
|
||||
directory_file = "index.html"
|
||||
upload_accept = false
|
||||
upload_dir = "www/upload"
|
||||
upload_dir = "www/real/upload"
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
[[server]]
|
||||
name = "Edu"
|
||||
host = "127.0.0.1"
|
||||
port = 8080
|
||||
body_size_limit = 100000
|
||||
[server.error_page]
|
||||
400 = "/var/www/poheck/Edu/errorPages/error_400.html"
|
||||
403 = "/var/www/poheck/Edu/errorPages/error_403.html"
|
||||
404 = "/var/www/poheck/Edu/errorPages/error_404.html"
|
||||
[[server.location]]
|
||||
location = "/"
|
||||
root = "/var/www/poheck/Edu/"
|
||||
methods = ["GET"]
|
||||
autoindex = false
|
||||
directory_file = "index.html"
|
||||
[[server.location]]
|
||||
location = "/errorlist"
|
||||
root = "/var/www/poheck/Edu/errorPages/"
|
||||
methods = ["GET"]
|
||||
autoindex = false
|
||||
directory_file = "this.html"
|
||||
[[server.location]]
|
||||
location = "/images"
|
||||
root = "/var/www/poheck/Edu/images/"
|
||||
methods = ["GET", "POST", "DELETE"]
|
||||
autoindex = true
|
||||
directory_file = "oops.html"
|
||||
[[server.location]]
|
||||
location = "/cats"
|
||||
root = "/var/www/poheck/Edu/images/cats/"
|
||||
methods = ["GET", "POST", "DELETE"]
|
||||
autoindex = true
|
||||
[[server.location]]
|
||||
location = "/dogs"
|
||||
root = "/var/www/poheck/Edu/images/dogs/"
|
||||
methods = ["GET", "POST", "DELETE"]
|
||||
autoindex = true
|
||||
[[server.location]]
|
||||
location = "/docs"
|
||||
root = "/var/www/poheck/Edu/docs/"
|
||||
redirect = ["301","http::/127.0.0.1::8080/documents"]
|
||||
[[server.location]]
|
||||
location = "/documents"
|
||||
root = "/var/www/poheck/Edu/documents/"
|
||||
methods = ["GET", "DELETE"]
|
||||
autoindex = true
|
||||
upload_accept = true
|
||||
upload_dir = "/var/www/poheck/Edu/upload/"
|
||||
[[server.location]]
|
||||
location = "/upload"
|
||||
root = "/var/www/poheck/Edu/upload/"
|
||||
methods = ["POST", "DELETE"]
|
||||
autoindex = true
|
||||
upload_accept = true
|
||||
upload_dir = "/var/www/poheck/Edu/upload/"
|
||||
[[server]]
|
||||
name = "2222"
|
||||
host = "localhost"
|
||||
port = 8081
|
||||
body_size_limit = 65356
|
||||
[server.error_page]
|
||||
404 = "/var/www/poheck/errorPages/error_404.html"
|
||||
[[server.location]]
|
||||
location = "/root2/"
|
||||
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"
|
||||
@@ -5,26 +5,27 @@
|
||||
body_size_limit = 100000000
|
||||
[[server.location]]
|
||||
location = "/"
|
||||
root = "tester/"
|
||||
root = "www/tester/"
|
||||
methods = ["GET"]
|
||||
autoindex = true
|
||||
directory_file = "index.html"
|
||||
[[server.location]]
|
||||
location = "/put_test"
|
||||
root = "tester/"
|
||||
root = "www/tester/"
|
||||
methods = ["PUT"]
|
||||
autoindex = true
|
||||
upload_dir = "tester/upload_here/"
|
||||
upload_accept = true
|
||||
upload_dir = "www/tester/upload_here/"
|
||||
[[server.location]]
|
||||
location = "*.bla"
|
||||
cgi_pass = "ubuntu_cgi_tester"
|
||||
[[server.location]]
|
||||
location = "/post_body"
|
||||
root = "tester/"
|
||||
root = "www/tester/"
|
||||
methods = ["POST"]
|
||||
body_size_limit = 100
|
||||
[[server.location]]
|
||||
location = "/directory"
|
||||
methods = ["GET"]
|
||||
root = "tester/YoupiBanane/"
|
||||
root = "www/tester/YoupiBanane/"
|
||||
directory_file = "youpi.bad_extension"
|
||||
|
||||
Reference in New Issue
Block a user