Just curious, if I didn't specify a DirectoryIndex anywhere in my amazon web services apache configure file, but there is a file called index.html in my DocumentRoot, when a user requests index.html what would happen? Would it just default to a 500 error?
Thanks.
答案 0 :(得分:0)
DirectoryIndex
has a default of index.html
, so if you did not specify anything, it would use that.
https://httpd.apache.org/docs/current/mod/mod_dir.html
The directory index file is served when a "directory" URL is requested, such as https://my.site.com/
. If someone requested the index file directly (say, https://my.site.com/path/index.xhtml
), that would be served regardless of setting (or result in a 404 if missing).