Closed RanniSch closed 10 months ago
http://localhost:8000 gives 200 and http://localhost:8000/index.html
when I change config to: server { autoindex off;
location /
{
allowed_Methods GET POST;
#index index.html;
}
} and do http://localhost:8000/ -> 403 forbidden (correct, because autoindex is off)
set autoindex to on, http://localhost:8000/ -> comes the index click on "../" -> comes the same site, because it's the root -> ok pictures will be shown, .ico and .txt will be downloaded -> ok for me click on dir (a file without ending) -> 500 Server error -> ok for me (server still runs)
@MaxIhme No matter if autoindex is on or off, I get:
ok
Is it enough to see the status code f.e. in Postman, or shall we print it also in the terminal?
Tested: localhost:8000/diversion.html --> shouldn't this give status code 301? It showed status code 200. Max: the requested html was loaded, that is a 200. And then the browser sees in that html a redirection and loads the page http://localhost:8000/upload.html (the redirection is in the html, and does not come from the server)
localhost:8000/upload.html worked and showed 200 localhost:8000/diversion.ht worked and showed 404