Well we learned a lot from Nginx, starting to incorporate some, but hoping for feedback before i do most of that, instead worked on improving the location sorter and checking that locations paths are valid, close but not quite done
This commit is contained in:
@@ -10,8 +10,9 @@ server {
|
||||
# client_body_limit 400;
|
||||
|
||||
index index.html; # this is another comment
|
||||
# i think root requires leading /
|
||||
# root goop;
|
||||
root www;
|
||||
root /www;
|
||||
# root www/test; # also works
|
||||
# root /www; # stat does not like this kind of definition
|
||||
# root /usr; # because it's looking at / aka absolute path
|
||||
@@ -19,21 +20,27 @@ server {
|
||||
# root /home/me/Programming/42/group_webserv; # but this is fine
|
||||
|
||||
location /test {
|
||||
root www/test;
|
||||
root /www/test;
|
||||
index index.html;
|
||||
}
|
||||
# If not explicitly set, ConfigParser need to genererate a location block
|
||||
# like this for path "/" (based on field "root" and "index" of the server)
|
||||
location / {
|
||||
root www;
|
||||
root /www;
|
||||
index index.html;
|
||||
allow_methods DELETE;
|
||||
}
|
||||
|
||||
allow_methods GET POST;
|
||||
|
||||
location /test/something.html {
|
||||
allow_methods GET POST DELETE;
|
||||
}
|
||||
|
||||
location /something/long/here {
|
||||
# location /something/long/here {
|
||||
# }
|
||||
|
||||
location /something/long {
|
||||
}
|
||||
|
||||
location /something/long/here/but/more {
|
||||
|
||||
Reference in New Issue
Block a user