4

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

Akylle
  • 41
  • 1
  • 1
  • 5
  • 3
    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 Answers1

5

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.

Shane Madden
  • 112,982
  • 12
  • 174
  • 248
  • 2
    ahaaa... hours spent to find the fix... just remove those damn quotes!!!!! it is working now – KawaiKx 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 04 '15 at 17:26
  • @KawaiKx, How would that even happen in the first place? Don't you use a plain text editor for config files? – Pacerier Apr 11 '16 at 15:47