-1
 * Starting web server apache2
apache2: Syntax error on line 214 of /etc/apache2/apache2.conf: Syntax error on line 3
of /etc/apache2/httpd.conf: Expected </> but saw </Directory>
Action 'start' failed.
The Apache error log may have more information.
   ...fail!
  • 3
    I think you should include the httpd.conf file in you question... – franzlorenzon Sep 18 '13 at 19:17
  • +1 for franzlorenzon. What do you did before you restart apache. What files do you create modify? – Josh Sep 18 '13 at 19:22
  • Also the /var/log/apache*.log – Braiam Sep 18 '13 at 19:22
5

Reinstalling apache would be the most easy way to fix your problem. But you will also lose all your settings:

sudo apt-get purge apache2
sudo apt-get install apache2

If you want to fix the problem the elegant way, you will need to fix the error in you httpd.conf file by editing it and replacing </> by </Directory> on line 214 (like the error indicates quite clearly):

sudo nano /etc/apache2/httpd.conf

You could also use any other editor (e.g. gedit or vim)

0

You have a problem with the file /etc/apache2/httpd.conf, on terminal type :

sudo gedit /etc/apache2/httpd.conf

on line 214 search a </> and change to </Directory> and save the file

or

try to reinstall apache on terminal type :

sudo apt-get remove apache2
sudo apt-get install apache2

this occured because a problem with syntax, problably you change anything of the file

  • 5
    it would need to be a sudo apt-get purge apache2 as its config files a regular remove would not remove the httpd.conf purge would blow away configs aswell. – 0x7c0 Sep 18 '13 at 20:03

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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