有人能告诉我,为什么Rocky 8上的nginx没有在/some/dir/下列出文件和dir?
我的配置是:
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;
}
}这个文件将被显示为/some/dir/index.html。没有目录列表,错误日志中也没有错误。
谢谢
发布于 2022-03-04 13:09:55
解决方法是将这一行添加到config: index index.html中,并从目录中删除该文件。真的很棘手。
https://stackoverflow.com/questions/71265834
复制相似问题