关于Apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 fo
来源:互联网 发布:网络彩票代理犯法吗 编辑:程序博客网 时间:2024/04/29 06:39
本文转自:
http://irayd.com/blog/about-apache2-could-not-reliably-determine-the-servers-fully-qualified-domain-name-using-127-0-1-1-for-servername/
最近准备学习php,所以就配了个apache2,突然发现每次启动apache都会提示 Apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName这个错误,百度了一番,分享下解决方法:
在sudo gedit /etc/apache2/httpd.conf
里面加一行ServerName localhost就OK了;
有可能你没有这个文件或者这个文件是空的,添加就行了.
然后我重启apache,发现还是提升这个错误,又百度了一番,发现是apache的默认配置文件apache2.conf中没有引用这个httpd.conf配置文件,解决办法是在include httpd.conf这个文件:
sudo gedit /etc/apache2/apache2.conf
找到
# Include module configuration:Include /etc/apache2/mods-enabled/*.loadInclude /etc/apache2/mods-enabled/*.conf……# Include ports listingInclude ports.conf……# Include generic snippets of statementsInclude conf.d/……# Include the virtual host configurations:Include sites-enabled/
# Include all the user configurations:Include httpd.conf
就可以了.
还有一点,更改默认的web文档根目录:对于Ubuntu而言,默认的是/var/www。怎么知道的呢?apache2.conf里并没有DocumentRoot项,httpd.conf又是空的,因此肯定在其他的文件中。经过搜索,发现在/etc/apache2/sites-enabled/000-default中,里面有这样的内容:
NameVirtualHost *<VirtualHost *>ServerAdmin webmaster@localhostDocumentRoot /var/www/
这个就是了.更改成你想要的就可以了,当然别忘了设置权限哦!
0 0
- 关于Apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 fo
- 关于Apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 fo
- apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for
- apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for
- Apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for
- apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for
- apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1
- apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for
- apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for
- AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0
- httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.1.229 fo
- apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName错误的解决方法
- apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
- Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerNam
- Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerNam
- apache2提示 Could not reliably determine the server's fully qualified domain name, 127.0.0.1
- httpd:httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1
- Apache启动"httpd: Could not reliably determine the server's fully qualified domain name, using 127.0."
- cocos lua 客户端项目规范
- 【android学习】带清除功能的EditText重写
- 网站部署可能遇到的若干问题
- C++中两个大整数相乘
- Java Web基础——Action+Service +Dao三层的功能划分
- 关于Apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 fo
- c++11中的tuple(元组)
- DOS运行Java命令的同时添加依赖jar包
- HashMap的实现原理
- [Android] IntentInjector
- 蓝桥杯 算法训练 瓷砖铺放(vip)
- Bootstrap静态cdn
- defer、async属性以及JS异步加载并执行解决方案
- Leetcode 8. String to Integer (atoi)