Directory index forbidden by Options directive的解决办法

3780阅读 0评论2014-10-31 openwrt
分类:Web开发

去除Apache默认页面 以及 日志报错 /var/log/httpd/error_log

Apache log:

后来在log中找到如下一行

Directory index forbidden by Options directive: /var/www/html/


google一下,采用了一个高人得建议,删除以下两个页面

rm -f /etc/httpd/conf.d/welcome.conf  ← 删除测试页

rm -f /var/www/error/noindex.html  ← 删除测试页

再次打开站点,又是报错“You don't have permission to access / on this server.”,关了iptables和selinux还是无果,于是动手重启apache,报错
(98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
唉,原来进程端口被占用
# ps -aux|grep httpd   //找到进程号
# kill -9  xx  //杀掉进程XX
# /usr/local/apache2/bin/apachectl -k start   //启动apache

启动成功,站点打开成功
上一篇:/usr/bin/ld: cannot find -lc 解决
下一篇:gentoo linux 网卡eno1677736修改成eth0 的方法