merge, the whole thing is cleaner

This commit is contained in:
Eric LAZO
2022-08-15 19:54:26 +02:00
29 changed files with 551 additions and 260 deletions

View File

@@ -1,29 +1,35 @@
server {
# this is a comment
server_name our_server;
server_name server1;
listen 0.0.0.0:4040;
# client_body_limit asdfa;
client_body_limit 3000000;
client_body_limit 5000;
# Max == 18446744073709551615 / 1024 == 18014398509481984
index index.html; # this is another comment
#index mdr.html; # this is another comment
root ./www/;
error_page 404 ./www/error_pages/error_404.html;
# something to do with /upload
location / {
allow_methods GET;
root ./www/;
}
# location /srcs/cgi-bin/ {
# root ./srcs/cgi-bin/;
# allow_methods POST;
# cgi_ext php;
# }
location /srcs/cgi-bin/ {
root ./srcs/cgi-bin/;
allow_methods POST;
cgi_ext php;
}
location /list {
autoindex on;
@@ -31,18 +37,18 @@ server {
location /cgi-bin {
root ./srcs/cgi-bin/;
cgi_ext cpp php sh;
cgi_ext out php sh;
}
location /upload {
allow_methods POST;
autoindex on;
upload_dir ./www/user_files/; # TODO: append a '/' if there is none ?
upload_dir ./www/user_files/;
# root doesnt matter if used only with POST and no CGI
}
location /the_dump {
allow_methods GET;
allow_methods GET DELETE;
root ./www/user_files;
autoindex on;
}
@@ -89,5 +95,13 @@ server {
# allow_methods DELETE;
# }
}
server {
server_name server2;
listen 0.0.0.0:4040;
index index.html;
root ./www2/;
}