博主辛苦了,我要打赏银两给博主,犒劳犒劳站长。
【摘要】在我们刚刚装好 apache(httpd) 的时候,我们通常都会迫不及待的想启动 apache 服务,但是在 centos 6.3 下面(其它版本我不知道),是需要给 ServerName 设置名称的,否则会报错,本文给自己记录一下这个步骤,希望自己能够记住这一步骤。
错误提示如下:
[root@localhost ~]# service httpd start
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName
如果通过 yum 源安装 apache 的话,那么配置文件的位置是:/etc/httpd/conf/httpd.conf ,在 配置文件中中找到如果一行:
#ServerName www.example.com:80
在下一行添加:
ServerName 127.0.0.1:80
保存并退出。
[root@localhost conf]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
这样就解决了问题。
版权归 马富天个人博客 所有
本文链接地址:http://www.mafutian.com/348.html
转载请务必注明出处,小生将不胜感激,谢谢! 喜欢本文或觉得本文对您有帮助,请分享给您的朋友 ^_^
顶0
踩0
评论审核未开启 |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
||