Starting Apache2 on Ubuntu Failed

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!


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


End the virtualhost tag:

</VirtualHost> (it's located after line 7 )


这取决于如果您运行多个虚拟主机,则必须关闭每个虚拟主机,然后再启动另一个虚拟主机

<VirtualHost 10.1.2.3:80>
    ServerAdmin webmaster@host.example.com
    DocumentRoot /www/docs/host.example.com
    ServerName host.example.com
    ErrorLog logs/host.example.com-error_log
    TransferLog logs/host.example.com-access_log
</VirtualHost> 
链接地址: http://www.djcxy.com/p/64208.html

上一篇: Ubuntu中的Apache2和ServerRoot指令

下一篇: 在Ubuntu上启动Apache2失败