0

hi all I am new to apache2 and i have installed apache2 on my ubuntu machine and edited apache2.conf file wrongly. and when i am trying to start it I am getting an error message like this:

Starting web server apache2
apache2: Syntax error on line 236 of /etc/apache2/apache2.conf:
    Syntax error on line 2 of /etc/apache2/sites-enabled/mysiteM-D:
    </VirtualHost without matching <VirtualHost section
[fail]**

what should i do?

1
  • You can start by posting those lines, and 2 lines in either direction from those for context. Oct 13, 2010 at 16:00

2 Answers 2

2

Did you keep a copy of the files before you began editing them? If not, then make a note to always keep a copy. You should be able to go and download clean copies. So one approach is to go bakc to clean install.

Another approach is to study the error message. Something is wrong on line 236. Is that a line you changed? Compare it with examples you find on net, study the documentation figure to figure out jow to fix it.

It looks like actually that its your entry in sites-enabled directory that's the problem. Is that the file referenced in line 236? Compare this site file with other site files, try and spot the problem.

1

You are actually safe because in the original folder there is a copy so just open it and copy all and paste in the one you messed up which is in the conf folder!

If you still have this problem can you please paste line 235 here and I can figure it out.

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