Index and Autoindex work nicely, standarized way paths for root and location path are stored in config, still needs a little polishing prolly

This commit is contained in:
Me
2022-08-08 02:50:37 +02:00
parent cf69168a84
commit 9ee7205b95
13 changed files with 99 additions and 173 deletions

View File

@@ -10,30 +10,13 @@ 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
# root ~/Programming/42/group_webserv/www; # didn't like thise either
# root /home/me/Programming/42/group_webserv; # but this is fine
root ./www/;
location /test {
# root /www/test;
autoindex on;
index something.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;
# index index.html;
# allow_methods DELETE;
# }
# location /test/something.html {
location /test/something.html {
allow_methods DELETE;
}
@@ -41,7 +24,8 @@ server {
# location /something/long/here {
# }
location /test/test_deeper {
location /test/test_deeper/ {
autoindex on;
}
location /test/test_deeper/something.html {