Files
42_INT_12_webserv/Tester/test2.config
Eric LAZO da5d1f38b0 merging
2022-08-17 19:45:37 +02:00

96 lines
1.6 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
server {
# this is a comment
server_name server1;
listen 0.0.0.0:8080;
client_body_limit 1;
# Max == 18446744073709551615 / 1024 == 18014398509481984
index index.html; # this is another comment
root ./Tester/www/;
error_page 404 ./Tester/www/error_pages/error_404.html;
location / {
allow_methods GET;
root ./Tester/www/;
}
location /srcs/cgi-bin/ {
root ./srcs/cgi-bin/;
allow_methods POST;
cgi_ext php;
}
location /list {
autoindex on;
}
location /cgi-bin {
root ./srcs/cgi-bin/;
cgi_ext out php sh;
}
location /upload {
allow_methods POST;
autoindex on;
upload_dir ./Tester/www/user_files/;
# root doesnt matter if used only with POST and no CGI
}
location /the_dump {
allow_methods GET DELETE;
root ./Tester/www/user_files;
autoindex on;
}
location /redirect {
redirect 307 https://fr.wikipedia.org/wiki/Ketchup;
# redirect 307 https://www.youtube.com/watch?v=rG6b8gjMEkw;
}
location /test {
index index1.html subdex.html;
root ./Tester/www/test/;
}
location /stylesheet {
root ./stylesheet/;
}
location /test/index1.html {
root ./Tester/www/test/index1.html;
index index1.html subdex.html;
}
location /hilarious_404/ {
redirect 301 https://berniesanders.com/404/;
}
location /test/something.html {
# allow_methods DELETE;
root ./Tester/www/test/something.html;
}
location /test/test_deeper/ {
# allow_methods
root ./Tester/www/test/test_deeper/;
}
location /test/test_deeper/super_deep {
root ./Tester/www/test/test_deeper/super_deep/;
}
# location /test/test_deeper/something.html {
# allow_methods DELETE;
# }
}