vi /etc/httpd/conf/httpd.conf   加入一句  ServerName  localhost:80

参考:https://www.cnblogs.com/52linux/archive/2012/03/24/2415637.html