5 lines
1.1 KiB
HTML
5 lines
1.1 KiB
HTML
|
<!DOCTYPE html><html><head><meta charset="utf-8"><meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link type="text/css" rel="stylesheet" href="/style.css"><link type="text/css" rel="stylesheet" href="style.css"><title>Mirrored Gemini content.</title></head><body><h1> Enabling File List Mode NGINX</h1><p>If there isn't an `index.html` file in a specific directory you want to view, accessing that URL path will result in a "404 Not Found" error. However, Nginx includes an autoindex module that can automatically generate a directory listing. Adding autoindex to your Nginx configuration is straightforward. Simply add it to the `location` block in your Nginx configuration file like this:</p><pre>location /somedirectory/ {
|
||
|
autoindex on;
|
||
|
}
|
||
|
</pre><p>Once you've made this change, restart your Nginx server using `sudo service nginx restart`. Now, instead of displaying a "404" error, the web server will show a directory listing similar to the one described earlier for the directory/directories defined in your `location` block.</p></body></html>
|