Files
42_INT_12_webserv/default.config
LuckyLaszlo 86f7740984 Moved most request errors check in Client
+ bugfix of "Bad file descriptor" due to empty operator=() in Client
+ added a condition in _determine_location_COOP_FIX()
+ udpate memo.txt
+ need fix for index/autoindex (location "/list" dont work)
2022-08-10 07:19:05 +02:00

73 lines
1.2 KiB
Plaintext

server {
# this is a comment
server_name our_server;
listen 0.0.0.0:4040;
# client_body_limit asdfa;
# client_body_limit 400;
index index.html; # this is another comment
root ./www/;
error_page 404 ./www/error_pages/error_404.html;
location /list {
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;
}
location /test/index1.html {
index index1.html subdex.html;
}
location /hilarious_404/ {
redirect 301 https://berniesanders.com/404/;
}
# /stylesheet/ alone doesn't work, i mean we don't have wildcards...
location /stylesheet/style.css {
# root ./www/../;
root ./;
}
location /test/something.html {
# allow_methods DELETE;
}
# location /something/long/here {
# }
location /test/test_deeper/ {
# allow_methods
autoindex on;
}
location /test/test_deeper/super_deep {
autoindex on;
}
# location /test/test_deeper/something.html {
# allow_methods DELETE;
# }
# ok in theory if one were to go to /test they would get the index in www
# as opposed to the one in /website...
# location /test {
# root /www;
# }
}