在 Ubuntu 上启动 Apache2 失败 [英] Starting Apache2 on Ubuntu Failed

查看:39
本文介绍了在 Ubuntu 上启动 Apache2 失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用了 OSQA 的 Ubuntu 和 MYSQL 安装指南.在我到达最后一步之前非常简单,那就是启动 Apache2 服务器.我仔细检查了是否我错过了之前的任何步骤,但我确实错过了一个.这是 sudo ln -s/etc/apache2/sites-available/osqa/etc/apache2/sites-enabled/osqa 命令.所以我从我的根目录运行了这个命令.运行上述命令后,我再次尝试启动 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!

我遵循的安装指南是:http://wiki.osqa.net/display/docs/Ubuntu+with+Apache+and+MySQL

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

任何帮助将不胜感激!

推荐答案

您服务器的配置文件有错误.使用文本编辑器打开 /etc/apache2/apache2.conf 并添加 VirtualHost 结束标记:

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

这篇关于在 Ubuntu 上启动 Apache2 失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆