Apache Startup error permission denied:httpd:could not open error log file resolution _linux

Source: Internet
Author: User

First, the system environment

CentOS 6.3 X64
Yum installed Apache
Version: httpd-2.2.15-30.el6.centos.x86_64

Second, the problem description

New Add Virtual host site, can not start, view log, display:

Copy Code code as follows:

Start httpd: (Permission denied:httpd:could not open error log file/home/wwwroot/jb51.net/logs/error_log.
Unable to open logs
Failed

Iii. causes of the problem

Because of the newly installed system, SELinux is turned on by default.

Iv. Methods of Settlement

1, temporarily shut down (do not restart the machine):

Copy Code code as follows:
Setenforce 0 # #设置SELinux become permissive mode
# #setenforce 1 set SELinux become enforcing mode

2, modify the configuration file needs to reboot the machine:

modifying/etc/selinux/config files
Change Selinux=enforcing to Selinux=disabled
Reboot the machine.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.