To do this, declare the index.html file index. Then if there is a file with the same name in the directory, then accessing the directory will automatically download this file.
Usually, by default on almost all servers, index.html is designated as an index file, but for some reason this may not be the case. In the Apache Web server, the DirectoryIndex
directive is responsible for the index file. You can list several index files separated by commas (files on the left have priority)
DirectoryIndex index.html index.php
In the nginx Web server, the index directive is used to set the index file.
location / { index index.html index.php; }