Linux changes Apache Web site Directory error: Document root must be a directory address

Source: Internet
Author: User
Linux Changes Apache Web site Directory error: Document root must be a directory fix modify DocumentRoot <directory "C:/apache/apache2/htdocs" Restart Apach E Error document root must be a directory then find the reason is actually added to the list of the original only so ask the big God's explanation is "this is the system to open the SELinux security policy caused." The directory or file is set to the user_home_t type, so the Apache process has no permissions and cannot be accessed. The SELinux target policy used by the Apache process specifies that the Apache process can only access directories or files of type httpd_sys_content_t. "The workaround changes folder permissions to change the policy type of the directory or file to httpd_sys_content_t." 1chcon-r-T httpd_sys_content_t/home/www/then use the ls-z command to view the file directory's policy type (directory permissions). 1[[email protected] home]# ls-z2drwx------. MySQL MySQL unconfined_u:object_r:user_home_dir_t:s0 mysql3drwxr-xr-x. root root unconfined_u:object_r:httpd_sys_content_t:s0 www so good, ok! Http://www.2cto.com/os/201310/252027.html

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.