修改httpd.conf vim /etc/httpd/conf/httpd.conf 将里面的 #ServerName localhost:80 注释去掉即可。 再执行 systemclt restart httpd