apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for

his is just a friendly warning and not reallya problem (as in that something does not work).

If you insert a

ServerNamelocalhost  

in either httpd.conf or apache2.conf in /etc/apache2 and restart apache the notice will disappear.

If you have a nameinside /etc/hostname you can also use that name instead of localhost.


And it uses 127.0.1.1 if it is inside your /etc/hosts:

127.0.0.1localhost

127.0.1.1myhostname

Preferred method

Troubleshooting Apache

If you get this error:

apache2:Could not determine the server's fully qualified domain name,

using127.0.0.1 for ServerName

then use a text editor such as "sudonano" at the command line or "gksudo gedit" on the desktop tocreate a new file,

sudo nano/etc/apache2/conf.d/fqdn

or

gksu"gedit /etc/apache2/conf.d/fqdn"

then add

ServerNamelocalhost

to the file and save. This can all be done ina single command with the following:

 echo "ServerName localhost" | sudotee /etc/apache2/conf.d/fqdn

But on Ubuntu 14.04:

 echo "ServerName localhost" | sudotee /etc/apache2/conf-available/fqdn.conf

 sudo a2enconf fqdn

Don't forget the ".conf" (withoutwill not work).

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值