Httpd service not starting... Error "Documentroot must be a directory"

I am working with CentOS 6.5.
Indeed the document root /var/www/html is a directory and it is a mount point of one file system (not NFS)
I observed, if I unmount that file system, I could able to start httpd.

Is it restricted in CentOS 6.X that the Documentroot can not be a mount point? Whether we can set one particular directory the documentroot for http even if the directory is a mount point?

Please advice/help.

What http server is this? I'm assuming apache, but it's not stated.

What filesystem is it?

What are the permissions on the folder, once it's mounted? This could be an oddly mangled form of 'permission denied'.

It is Apache. Giving some outputs..

[root@rhel6 ~]# df -h /var/www/html
Filesystem           Size  Used Avail Use% Mounted on
/dev/mapper/vg1-lv1  7.9G  4.8G  2.8G  64% /var/www/html

[root@rhel6 ~]# mountpoint /var/www/html
/var/www/html is a mountpoint

[root@rhel6 ~]# ls -ld /var/www/html
drwxr-xr-x. 7 root root 4096 Oct  7 19:35 /var/www/html

[root@rhel6 ~]# cat /etc/httpd/conf/httpd.conf|grep DocumentRoot|grep -v "#"
DocumentRoot /var/www/html

[root@rhel6 ~]# service httpd start
Starting httpd: Syntax error on line 293 of /etc/httpd/conf/httpd.conf:
DocumentRoot must be a directory
                                                           [FAILED]
[root@rhel6 ~]#

Have you looked to around that specific line and see if you spot the syntax error?

Syntax error on line 293 of /etc/httpd/conf/httpd.conf:

Could you show us a portion of that file around line 293? The error might be somewhat before that, since the parser might only realized that there was an problem when it reached line 293.

---------- Post updated at 10:24 AM ---------- Previous update was at 09:55 AM ----------

I noticed, now, that you mentioned that /var/www/html is a mount point.
Are you running Selinux?

Could you post the output of the following two commands, as well?

ls -ldZ /var/www/html
sestatus

If SELinux is enabled, try the following with the filesystem mounted:

#  chcon -R -h -t httpd_sys_content_t /var/www/html 
2 Likes

Actually, if Selinux is enforcing, all that is needed is restorecon since /var/www/html is included in the policy already.

restorecon -R -v /var/www/html