Change DocumentRoot Apache
# DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # DocumentRoot "/var/www/html" # This should be changed to whatever you set DocumentRoot to.problem:
step:service httpd start Starting httpd (via systemctl): Job failed. See system logs and 'systemctl status' for details. [FAILED]
su systemctl enable httpd.service systemctl restart httpd.serviceresult:
[root@localhost www]# systemctl enable httpd.service httpd.service is not a native service, redirecting to /sbin/chkconfig. Executing /sbin/chkconfig httpd on [root@localhost www]# systemctl restart httpd.service Job failed. See system logs and 'systemctl status' for details.step:
cat /var/log/messages | grep httpdresoult:
SELinux is preventing /usr/sbin/httpd from getattr access on the directory /var/www/html. For complete SELinux messages. run sealert -l 14582266-6a67-49f5-96a7-790b495c2cd6step:
Q: How do I enable/disable SELinux protection on specific daemons under the targeted policy?
A: Use system-config-selinux, also known as the SELinux
Administration graphical tool, to control the Boolean values of specific daemons. For example, if you need to disable SELinux for Apache to run correctly in your environment, you can disable the value in system-config-selinux. This change disables the transition to the policy defined in apache.te, allowing httpd to remain under regular Linux DAC security.
The
# setsebool -P httpd_read_user_content 1result [Solved]:
service httpd start Starting httpd (via systemctl): [ OK ]