今天安装了一个apache,配置了一个主机,以访问提示403,查看日志提示Directory index forbidden by Options directive: /var/www/html/,百度查了一下,有人说用一下方式解决:

rm -f /etc/httpd/conf.d/welcome.conf  ← 删除测试页
rm -f /var/www/error/noindex.html  ← 删除测试页

然后重启apache,挺好使,删除了重启访问就正常了