httpd: Could not reliably determine the server's fully qualifieddomain name, using 127.0.0.1 for ServerName
解决办法非常简单:
#vim /web/apache/conf/httpd.conf(在这里/web/apahce是我安装apache的目录,你默认安装的话应该是/usr/local/apache2/icons)
找到#ServerNamewww.example.com:80 把#去掉,再重启apache即可没事了。
现象:
這個問題應該是沒有在 /etc/httpd/conf/httpd.conf 中設定ServerName
最简单的,修改httpd.conf文件,增加:
ServerName www.example.com:80
我的改为:
再次启动就正常了!
或者~~~~~~~~~~~~~
解决方法:如果不存在就需要创建这个目录,如果是在别的硬盘上可能需要挂载一下硬盘并添加到开启启动自动挂载硬盘。
其次看看你的selinux是不是开启的,如果是开启的而你又没有设置规则也会提示这个!
解决方法:关闭selinx,重启linux服务器后生效。也就是将/etc/selinux/config配置项中SELINUX设置成disabled(SELINUX=disabled),然后重启才能生效。
最后看看是不是防火墙的问题
解决方法:关闭防火墙后测试一下就知道是不是防火墙的问题了!root下输入service iptables stop 然后service httpd restart 看看还会不会报错!
解决办法非常简单:
#vim /web/apache/conf/httpd.conf(在这里/web/apahce是我安装apache的目录,你默认安装的话应该是/usr/local/apache2/icons)
找到#ServerNamewww.example.com:80
现象:
bogon:~/webserver/httpd-2.0.59 #/usr/local/apache2/bin/apachectl start
httpd: Could not determine the server's fully qualified domainname, using 127.0.0.1 for ServerName
httpd (pid 20183) already running
httpd: Could not determine the server's fully qualified domainname, using 127.0.0.1 for ServerName
httpd (pid 20183) already running
這個問題應該是沒有在 /etc/httpd/conf/httpd.conf 中設定ServerName
vi /usr/local/apache2/conf/httpd.conf
最简单的,修改httpd.conf文件,增加:
ServerName www.example.com:80
我的改为:
ServerName www.example.com:80
再次启动就正常了!
或者~~~~~~~~~~~~~
解决方案:
用记事本打开 httpd.conf
将里面的 #ServerNamelocalhost:80 注释去掉即可。
再执行 httpd
然后可以通过浏览器访问 http://localhost:80 ,如果页面显示 “It works!” ,即表示apache已安装并启动成功。
++++++++++++++++++++++++++++++++++++++++++++
using localhost.localdomain forServerName 说不能确认服务器完全确认域名localhost.localdoman 这个问题怎么解决
最佳答案:
vi/etc/httpd/conf/httpd.conf
Starting httpd: Warning: DocumentRoot [/web/1] does not exist
首先要确认你的 /web/1 这个目录是不是正的存在,不存在肯定会提示这个!解决方法:如果不存在就需要创建这个目录,如果是在别的硬盘上可能需要挂载一下硬盘并添加到开启启动自动挂载硬盘。
其次看看你的selinux是不是开启的,如果是开启的而你又没有设置规则也会提示这个!
解决方法:关闭selinx,重启linux服务器后生效。也就是将/etc/selinux/config配置项中SELINUX设置成disabled(SELINUX=disabled),然后重启才能生效。
最后看看是不是防火墙的问题
解决方法:关闭防火墙后测试一下就知道是不是防火墙的问题了!root下输入service iptables stop 然后service httpd restart 看看还会不会报错!
本文介绍了解决Apache服务器启动时出现的“Could not reliably determine the server's fully qualified domain name”错误的方法。通过修改httpd.conf文件中的ServerName设置,并确保正确配置Apache安装路径,可以有效解决该问题。
11万+

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



