@CrypticDesigns - The
location directive is for NGINX :-). He's using a LAMP Stack, thus, Apache is the web server he's currently using. What you've provided would work if he was looking to compare the request to an existing HTML file though (i.e.
domain.com/about/ would attempt to serve
An issue arises, however, when a file does not exist. If that block is to be used, then error pages need to be defined as well, otherwise you'll be looking at a black & white error if the file cannot be found (this applies to HTML files -- if PHP was being used, this would be a non-issue as the request would still route to index.php).
@barrorod - @Halonen is correct. You'll need to define your
DirectoryIndex directive and list indexes in the order that you'd like Apache to attempt.
For example, if we used the example provided by @Halonen , Apache will first attempt to find
index.html followed by
index.htm. If neither of these files exist, you'll either see an error page or you'll be able to view the contents of the directory.
If defining the
DirectoryIndex directive does not work, please post your VirtualHost configuration.