Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Starting Apache2 on Ubuntu Failed

Tags:

apache2

I used the the Ubuntu with and MYSQL installation guide for OSQA. It was very simple to follow until I reached the last step, which was starting the Apache2 server. I double checked to see if I missed any of the previous steps and I did happen to miss one. It was the sudo ln -s /etc/apache2/sites-available/osqa /etc/apache2/sites-enabled/osqa command. So I ran this command from my root directory. After running the above command I tried starting the Apache2 server again. It still didn't work. I then ran these commands:

sudo chmod -R g+w /home/osqa/osqa-server/forum/upfiles
sudo chmod -R g+w /home/osqa/osqa-server/log

These didn't help with the issue. The errors I get when I start or restart the server are:

osqa@osqa-Latitude-E4300:/$ sudo /etc/init.d/apache2 restart
[sudo] password for osqa: 
Sorry, try again.
[sudo] password for osqa: 
apache2: Syntax error on line 230 of /etc/apache2/apache2.conf: Syntax error on line 7 of /etc/apache2/sites-enabled/osqa: /etc/apache2/sites-enabled/osqa:7: <VirtualHost> was not closed.
Action 'configtest' failed.
The Apache error log may have more information.
   ...fail!

The installation guide I was following was:http://wiki.osqa.net/display/docs/Ubuntu+with+Apache+and+MySQL

Any help would be appreciated greatly!

like image 564
Noah R Avatar asked Feb 16 '12 21:02

Noah R


1 Answers

the configuration file of your server has errors. Open /etc/apache2/apache2.conf with a text editor and add a VirtualHost closing tag: </VirtualHost>

like image 116
robertboloc Avatar answered Oct 18 '22 07:10

robertboloc