'nginx directory listing on Rocky Linux
Can anyone tell me why nginx on Rocky Linux 8 is not listing files and dirs under /some/dir/ ?
My config is:
cat /etc/nginx/conf.d/web.conf
server {
listen 80;
server_name some_name.com;
access_log /var/log/nginx/access.some_name.com.log;
error_log /var/log/nginx/error.some_name.com.log;
root /some/dir;
location / {
autoindex on;
}
}
This file is displayed instead /some/dir/index.html. No directory listing and no error in the error log.
Thank you
Solution 1:[1]
Resolution is to add this line into config: index index.html; and delete the file from the directory. Really tricky.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Nicco |
