今天在ubuntu系统上重启apache时,出现了这个问题: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName, 估计是httpd.conf,配置的问题,然后网上查了下,有两种情况:
1.安装的是普通的apache发行版本,就应该是在usr/local/apache2/conf/目录下,用vim打开http.conf,将#ServerName www.example.com:80 把#去掉,再重启apache即可没事了
2.如果和我一样,安装的是ubuntu 原生的apache2,你会发现,httpd.conf,是空文件,这是因为对于ubuntu而说主配置文件是apache2.conf,而httpd.conf只是一个用户配置文件,但是我们只要在httpd.conf中加入SeverName:127.0.0.1:80,然后保存
就可以了
本文介绍在Ubuntu系统上重启Apache2遇到的问题及解决办法。主要分为两种情况:普通Apache发行版通过修改http.conf文件;Ubuntu原生Apache2则需要编辑httpd.conf文件设置ServerName。
4797

被折叠的 条评论
为什么被折叠?



