解決ubuntuu上的小錯誤: “…127.0.1.1 for ServerName"

情形:

root@ubuntu:# /etc/init.d/apache2 restart
* Restarting web server apache2
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
 ... waiting .apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
                                                                                                            [ OK ]

方法:
打開command line輸入~

sudo sh -c 'echo "ServerName localhost" >> /etc/apache2/conf.d/name'

發表迴響