After changing the DocumentRoot to /home/test/www it prompts.
Starting httpd: Syntax error on line 293 of /etc/httpd/conf/httpd.conf:
DocumentRoot must be a directory
[root@sl ~]# getsebool -a |grep httpd_enable_homedirs
httpd_enable_homedirs –> off
It turns out that SELinux does not allow home directories to be used as web directories
Modify SELinux settings
[root@sl ~]# setsebool httpd_enable_homedirs on
After restarting apache, everything is fine
[root@sl ~]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
Similar Posts:
- [Solved] SQLSTATE[HY000] [2003] Can’t connect to MySQL serv
- About the Ubuntu configuration file apache2 httpd.conf position
- Solution to Samba inaccessibility caused by CentOS turning on SELinux
- [Solved] SELinux intercepts vsftpd for CentOS (without shutting down SELinux)
- Aapache can’t start, error message: suexec mechanism enabled (wrapper: / usr / SBIN / suexec)
- How to Solve Nginx Error 13: Permission denied) while connecting to upstream
- Xampp modify the port number Apache service detected with wrong [How to Solve]
- Apache was unable to start solving the requested operation has failed
- Xampp Startup Error: Port 80 in use by “Unable to open process” with PID 4!
- Solutions to start failed after dhcpd installation