well, restructured things a bit, but mostly started trying to sort LocationConfigs, it is sort of going well, good ideas, implementations is still a bit lacking...

This commit is contained in:
Me
2022-08-04 01:09:40 +02:00
parent b0c524a8bd
commit 3d46505411
13 changed files with 363 additions and 122 deletions

View File

@@ -10,22 +10,42 @@ server {
# client_body_limit 400;
index index.html; # this is another comment
root /website;
# root goop;
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
# root ~/Programming/42/group_webserv/www; # didn't like thise either
# root /home/me/Programming/42/group_webserv; # but this is fine
location /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;
allow_methods GET POST;
location /something/long/here {
}
location /something/long/here/but/more {
}
# 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;
}
# location /test {
# root /www;
# }
}