我在Ubuntu 13.10中的Apache 2.4中有问题。
我尝试将文档根目录更改为/ home / fandi / public_html
一切都正常。但是我尝试在我的public_html /我创建文件夹,我会收到如下错误:
[Sat Jan 25 10:59:50.149441 2014] [autoindex:error] [pid 1093] [client 127.0.0.1:39901] AH01276: Cannot serve directory /home/fandi/public_html/report_php/: No matching DirectoryIndex (index.html,index.cgi,index.pl,index.php,index.xhtml,index.htm) found, and server-generated directory index forbidden by Options directive
我必须创建文件index.html,index.php和其他index.xxx文件。
默认情况下,它必须显示目录索引。
如何启用目录索引?
这是我的文件000-default.conf:
ServerAdmin webmaster@localhost
DocumentRoot /home/fandi/public_html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Options All
AllowOverride All
Require all granted
Options Indexes FollowSymLinks
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
请帮忙,谢谢^^