注意以下,我测试的时候是没有用的
有用的在这:
stack@w2-ProLiant-DL160-G6:~$ sudo service apache2 stop
* Stopping web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
... waiting [ OK ]
stack@w2-ProLiant-DL160-G6:~$ sudo service apache2 start
* Starting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[ OK ]
* Stopping web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
... waiting [ OK ]
stack@w2-ProLiant-DL160-G6:~$ sudo service apache2 start
* Starting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[ OK ]
这里编辑就是在
httpd.conf中添加ServerName localhost
如果没有这个文件就创建
stack@w2-ProLiant-DL160-G6:~$ sudo vim /etc/apache2/httpd.conf
stack@w2-ProLiant-DL160-G6:~$
stack@w2-ProLiant-DL160-G6:~$
stack@w2-ProLiant-DL160-G6:~$ sudo service apache2 stop
* Stopping web server apache2 ... waiting . [ OK ]
stack@w2-ProLiant-DL160-G6:~$ sudo service apache2 start
* Starting web server apache2
stack@w2-ProLiant-DL160-G6:~$ sudo vim /etc/apache2/httpd.conf
stack@w2-ProLiant-DL160-G6:~$
stack@w2-ProLiant-DL160-G6:~$
stack@w2-ProLiant-DL160-G6:~$ sudo service apache2 stop
* Stopping web server apache2 ... waiting . [ OK ]
stack@w2-ProLiant-DL160-G6:~$ sudo service apache2 start
* Starting web server apache2
参考http://irayd.com/blog/about-apache2-could-not-reliably-determine-the-servers-fully-qualified-domain-name-using-127-0-1-1-for-
servername/