在apache根目录添加php文件路径,webserver – 如何使用自定义文档根目录在Apache 2.4中显示目录索引...

我在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

请帮忙,谢谢^^

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值