From 58e8e1d0615b5892681724dbc5a08ed4e18a2bde Mon Sep 17 00:00:00 2001 From: Talyx Date: Wed, 9 Feb 2022 17:14:42 +0300 Subject: [PATCH] update: server config --- config/real.toml | 64 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 55 insertions(+), 9 deletions(-) diff --git a/config/real.toml b/config/real.toml index bf5f769..f7efac2 100644 --- a/config/real.toml +++ b/config/real.toml @@ -4,22 +4,50 @@ port = 8080 body_size_limit = 1000 [server.error_page] - 404 = "error_404.html" + 404 = "www/errorFolder/error_404.html" + 403 = "www/errorFolder/index2.html" [[server.location]] location = "/" root = "www/" - redirect = ["301", "http://localhost/secret"] methods = ["GET", "POST", "DELETE"] autoindex = true - directory_file = "its_a_directory.html" + directory_file = "index.html" upload_accept = true upload_dir = "/var/www/html/upload" [[server.location]] - location = "/secret/" - root = "/var/www/html/secret.html" + location = "/images" + root = "www/images" methods = ["GET"] + autoindex = true + [[server.location]] + location = "/images/168.png" + redirect = ["301", "http://127.0.0.1:8080/168.png"] + [[server.location]] + location = "/errorFolder/images/168.png" + redirect = ["301", "http://127.0.0.1:8080/168.png"] + [[server.location]] + location = "*.jpeg" + root = "www/images/jpegImg" + methods = ["GET"] + [[server.location]] + location = "*.png" + root = "www/images/pngImg" + methods = ["GET"] + [[server.location]] + location = "*.ico" + root = "www/images/icoImg" + methods = ["GET"] + [[server.location]] + location = "/errorFolder" + root = "www/errorFolder" + methods = ["GET", "POST", "DELETE"] autoindex = false - directory_file = "oops.html" + [[server.location]] + location = "*.php" + root = "www/script" + methods = ["GET", "POST"] + autoindex = false + cgi_pass = "/usr/bin/php-cgi" [[server]] name = "pohek2.org" host = "127.0.0.1" @@ -32,9 +60,27 @@ 407 = "error_407.html" [[server.location]] location = "/" - root = "www/" - methods = ["GET", "POST"] + root = "second/" + methods = ["POST"] autoindex = true - directory_file = "its_a_directory.html" + directory_file = "index.html" + upload_accept = false + upload_dir = "/var/www/html/upload" +[[server]] + name = "localhost" + host = "127.0.0.1" + port = 8081 + body_size_limit = 10000 + [server.error_page] + 404 = "error_404.html" + 405 = "error_405.html" + 406 = "error_406.html" + 407 = "error_407.html" + [[server.location]] + location = "/" + root = "second/" + methods = ["POST", "GET"] + autoindex = true + directory_file = "index.html" upload_accept = false upload_dir = "/var/www/html/upload"