当前位置: 首页 > 新闻动态 > 软件编程

Apache启动错误Permission denied: httpd: could not open error log file解决方法

作者:用户投稿 浏览: 发布日期:2026-01-16
[导读]:这篇文章主要介绍了Apache启动错误Permission denied: httpd: could not open error log file解决方法,需要的朋友可以参考下

一、系统环境

CentOS 6.3 X64
yum 安装的 apache
版本:httpd-2.2.15-30.el6.centos.x86_64

二、问题描述

新增加虚拟主机站点,启动不了,查看日志,显示:
复制代码 代码如下:
启动 httpd:(13)Permission denied: httpd: could not open error log file /home/wwwroot//logs/error_log.
Unable to open logs
[失败]

三、问题原因

因为新安装的系统,所以SELinux默认是开启状态,关闭即可

四、解决方法

1、临时关闭(不用重启机器):

复制代码 代码如下:setenforce 0                  ##设置SELinux 成为permissive模式
##setenforce 1 设置SELinux 成为enforcing模式

2、修改配置文件需要重启机器:

修改/etc/selinux/config 文件
将SELINUX=enforcing改为SELINUX=disabled
重启机器即可

免责声明:转载请注明出处:http://m.jing-feng.com.cn/news/343321.html

扫一扫高效沟通

多一份参考总有益处

免费领取网站策划SEO优化策划方案

请填写下方表单,我们会尽快与您联系
感谢您的咨询,我们会尽快给您回复!