Skip to content

Commit

Permalink
доп файлы
Browse files Browse the repository at this point in the history
  • Loading branch information
mtriston committed Jun 13, 2021
1 parent 57f2c66 commit d82e8d3
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 0 deletions.
78 changes: 78 additions & 0 deletions webserv.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
server {
listen 4444;

error_pages 404 {./error_pages/404.html}

server_name space.com;

default_file index.html;

accepted_methods GET;

location {
autoindex on;
accepted_methods GET;
path ./;
}

location /for_upload {
max_body_size 100b;
accepted_methods GET PUT POST DELETE;
path ./for_upload;
file_storage ./for_upload;
}

location /directory {
path ./;
}

location /files {
path ./for_upload;
autoindex on;
}

location /cgi-bin {
accepted_methods POST GET;
path ./cgi-bin;
}

location /redirect {
redirect 301 https://google.com;
}
}

server {
listen 1111;

server_name youpi.com;

client_max_body_size 20000000b;

default_file youpi.bad_extension;

location {
accepted_methods GET;
path ./YoupiBanane;
}

location /put_test {
accepted_methods PUT;
file_storage ./for_upload;
}

location /for_upload {
accepted_methods GET POST DELETE;
path ./for_upload;
file_storage ./for_upload;

}

location /post_body {
accepted_methods POST;
}

location /directory {
accepted_methods GET;
path ./;
}
}
10 changes: 10 additions & 0 deletions www/error_pages/400.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>FROM FILE</title>
</head>
<body>
<h1 style="color: #ab000b">400 Bad Request</h1>
</body>
</html>

0 comments on commit d82e8d3

Please sign in to comment.