Debian Apache2 启动报错 ServerName
Debian安装完Apache2后重启Apache2报错:
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
几乎所有Ubuntu/Debian Apache2的文章之中都说是要修改httpd.conf
,加入ServerName
,而实际上在Debian中httpd.conf
是空的,ServerName
需要加在ports.conf
之中才会起作用。
echo "ServerName ubuntu.mydomain.com" >> /etc/apache2/ports.conf