Starting httpd: Warning: DocumentRoot [/mywebsite/html] does not exist

Yesterday, I have installed and configured httpd on CentOS 6.5 server. I have also added the VirtualHost. when I restarted the httpd it’s given warning “Starting httpd: Warning: DocumentRoot [/mywebsite/html] does not exist” I’ve check the directory /mywebsite/html, it already created and permission is 0775.This is my virtual hosts configuration:

<VirtualHost *:80>
ServerAdmin webmaster@blog.ghanshammahajan.com
DocumentRoot /mywebsite/html
<Directory “/mywebsite/html”>
allow from all
Options +Indexes
</Directory>
ServerName blog.ghanshammahajan.com
ErrorLog logs/blog.ghanshammahajan.com-error_log
CustomLog logs/blog.ghanshammahajan.com-access_log common
</VirtualHost>

After making all this changes I have restarted the apache and I got below message :

“Starting httpd: Warning: DocumentRoot [/mywebsite/html] does not exist”

Solution :

1. Make sure directory exist or not
2. check permission
3. Finally solution check your SELinux policy. if it’s enabled then disbaled it. check with /etc/sysconfig/selinux, or try echo “0” >/selinux/enforce as root to see if disabling it.

Enjoy 🙂

Bookmark the permalink.

Comments are closed.