Take the 2-minute tour ×
Server Fault is a question and answer site for professional 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
                                            [FALLITO]

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

sestatus 
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

Andrea

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

1 Answer 1

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
1  
ahaaa... hours spent to find the fix... just remove those damn quotes!!!!! it is working now –  Saurabh Jun 26 at 16:26

Your Answer

 
discard

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.