apache的域名解析问题

在重启apache时候会报一个错误:
apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1. Set the ‘ServerName’ directive globally to suppress this message
在这里插入图片描述
解决方法:
生成一个fqdn.conf文件

vim /etc/apache2/conf-available/fqdn.conf

写入ServerName localhost
在这里插入图片描述
然后告诉apache去使用

a2enconf fqdn

在这里插入图片描述重启apache2,问题就解决了

service apache2 restart

在这里插入图片描述

发布了36 篇原创文章 · 获赞 9 · 访问量 8214

猜你喜欢

转载自blog.csdn.net/qq_44902875/article/details/104548245