Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I read all the previous answer but I couldn't fix my problem.. I'm changing the server where my website is hosted and I'm setting again apache.. Now, after installing php, fail2ban, etc i have that issue:

service httpd start 
Avvio di httpd: Syntax error on line 292 of /etc/httpd/conf/httpd.conf: DocumentRoot must be a directory

I've already disabled selinux and restarted, but nothing happened..

SELinux status:                 disabled

In other answer I read to post that.. But I don't know what it is, but I saw it is very different from other I saw..

ls -laZ /var/www/html/
drwxr-xr-x root root ?                                .
drwxr-xr-x root root ?                                ..
drwxr-xr-x root root ?                                form

Obviously my httpd.conf has

DocumentRoot "/var/www/html”

The root I need is

DocumentRoot "/var/www/html/form”

Now with the default root doesn't work, but before editing some files (I can't remember which) it started correctly. I hope you can help me.. I am using cents 6.5 x64.. Thank you very much


share|improve this question
DocumentRoot "/var/www/html/form” ... fix your close quote perhaps? Otherwise, give full configuration because obviously there is more. – ETL Feb 11 '14 at 23:27

1 Answer 1

up vote 3 down vote accepted

As ETL mentioned, your problem is almost certainly the quote character in DocumentRoot "/var/www/html/form” - you need to use DocumentRoot "/var/www/html/form" (or just DocumentRoot /var/www/html/form, which works fine.).

Never edit a configuration file like this in a text editor that replaces "" with “” or -- with , notably MS Word and Wordpad.

share|improve this answer
ahaaa... hours spent to find the fix... just remove those damn quotes!!!!! it is working now – Saurabh Jun 26 '14 at 16:26
+1 You can add Mac's TextEdit to that list of apps as well. Wasted 2 hours trying to figure it out. That will teach me to always use Sublime instead – JOpuckman Feb 4 at 17:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.