无法在 ubuntu 14.04 上重启 apache2 服务器 [英] Unable to restart apache2 server on ubuntu 14.04

查看:33
本文介绍了无法在 ubuntu 14.04 上重启 apache2 服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的 ubuntu 14.04 中安装 PHP 和 apache2.我通过以下命令安装了PHP和apache2

I am trying to install PHP and apache2 in my ubuntu 14.04. I installed PHP and apache2 through the following commands

  $sudo apt-get install php5-cli
  $sudo apt-get install apache2-bin

现在我只想在 ubuntu 系统上重启 apache2 服务器.但我得到了失败"重新启动 apache2 时出错.我在下面提到了错误

Now I just want to restart apache2 server on ubuntu system. But I am getting the "failed" error while restarting apache2. I mentioned the error below

AH00558:apache2:无法可靠地确定服务器的完全限定域名,使用 127.0.1.1.

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1.

全局设置ServerName"指令以抑制此消息

Set the 'ServerName' directive globally to suppress this message

谁能帮我解决这个错误?

Can anyone help me to solve this error?

我需要在 ubuntu 14.04 上重启我的 apache2 服务器.

I need to restart my apache2 server on ubuntu 14.04.

推荐答案

该问题与您收到的通知无关试试

The problem has nothing to do with the notice you are getting Try

tail -f  /var/log/apache2/error.log

或您系统上的类似位置以检查 Apache 错误日志.这将清楚地告诉您错误在哪里.我得到的最常见的一个是我在vhost配置中指定的日志目录丢失了

Or similar location on you system to check the Apache error log. This will clearly tell you where the error is. The most frequent one I get is that the log directory that I specified in the vhost configuration is missing

截至通知,添加

ServerName localhost

到您的配置,它将消失.如果您的主机名不是 localhost 运行

to your configuration and it will be gone. In case your hostname is not localhost run

hostname

了解它是什么,然后使用正确的值更新 ServerName 指令

to learn what it is and then update ServerName directive with the proper value

在 ubuntu 上,Apache conf 文件位于

On ubuntu the Apache conf file is in

/etc/apache2/apache2.conf

/etc/apache2/apache2.conf

这篇关于无法在 ubuntu 14.04 上重启 apache2 服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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