- _cgi_pos seems to be ok - construct url from return is not implemented yet + renamed script with extension .php and .cpp
73 lines
1.1 KiB
Plaintext
73 lines
1.1 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 /cgi-bin {
|
|
root ./srcs/cgi-bin/;
|
|
cgi_ext cgi php txt;
|
|
}
|
|
|
|
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 ./www/test/;
|
|
}
|
|
|
|
location /test/index1.html {
|
|
root ./www/test/;
|
|
index index1.html subdex.html;
|
|
}
|
|
|
|
location /hilarious_404/ {
|
|
redirect 301 https://berniesanders.com/404/;
|
|
}
|
|
|
|
location /stylesheet/ {
|
|
# root ./www/../;
|
|
root ./styelsheet/;
|
|
}
|
|
|
|
location /test/something.html {
|
|
# allow_methods DELETE;
|
|
root ./www/test/;
|
|
}
|
|
|
|
location /test/test_deeper/ {
|
|
# allow_methods
|
|
autoindex on;
|
|
root ./www/test/test_deeper/;
|
|
}
|
|
|
|
location /test/test_deeper/super_deep {
|
|
root ./www/test/test_deeper/super_deep/;
|
|
autoindex on;
|
|
}
|
|
|
|
# location /test/test_deeper/something.html {
|
|
# allow_methods DELETE;
|
|
# }
|
|
|
|
|
|
}
|