我刚刚安装了Apache 2.2.17,我第一次使用它.
现在,当我尝试使用该命令启动服务器时,service httpd start它向我提供了以下消息:
httpd:无法可靠地确定服务器的完全限定域名,使用:: 1表示ServerName
现在我想我必须在搜索Google时设置ServerName和IP地址.但我不知道我必须设置哪个文件.
我该如何解决这个问题?
小智 77
sudo vim /etc/apache2/httpd.confServerName localhostsudo /etc/init.d/apache2 restartnoo*_*odl 62
是的,您应该设置ServerName:
http://wiki.apache.org/httpd/CouldNotDetermineServerName
http://httpd.apache.org/docs/current/mod/core.html#servername
您可以在此处找到有关各种httpd分发使用的布局的信息:
http://wiki.apache.org/httpd/DistrosDefaultLayout
在您的情况下,要编辑的文件是/etc/httpd/conf/httpd.conf
zza*_*per 14
我没有得到ServerName错误.在导致此警告消息的VirtualHost配置中,它是httpd.conf顶部附近的通用配置,默认情况下已注释掉.
更改
#ServerName www.example.com:80
Run Code Online (Sandbox Code Playgroud)
至:
ServerName 127.0.0.1:80
Run Code Online (Sandbox Code Playgroud)
Ber*_*fez 10
在Debian Squeeze下;
应该工作正常(它确实解决了我的问题)
tks noodl为不同布局的链接.:)
sudo nano /etc/apache2/httpd.confServerName在 nano 编辑器中搜索文本<Ctrl + W>ServerName localhostsudo /usr/sbin/apachectl restart| 归档时间: |
|
| 查看次数: |
318578 次 |
| 最近记录: |