的ArchLinux的计算机上设置的主机名是比较琐碎本 - https://wiki.archlinux.org/index.php/HOSTNAME#Set_the_hostname设置ArchLinux的主机名(亚马逊EC2)
所以在我的/etc/rc.conf,我有
LOCALE="en_US.UTF-8"
TIMEZONE="UTC"
MOD_AUTOLOAD="no"
USECOLOR="yes"
USELVM="no"
DAEMONS=(syslog-ng sshd crond ec2 httpd)
HOSTNAME="archlinux"
和相应的在我的/ etc/hosts上,我有
127.0.0.1 archlinux.domain.org localhost.localdomain localhost archlinux
继文档到开球。
但不幸的是,重新启动httpd的失败,并会在error_log错误:
[Tue Sep 06 04:26:06 2011] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "ip-10-130-57-114"
配置失败
是的,我知道,从https://wiki.archlinux.org/index.php/Apache#Apache - 它可以通过评论
解决这个问题LoadModule unique_id_module modules/mod_unique_id.so
但我更愿意解决这个问题,保持这个模块加载并解决它通过确保相反,我在/ etc/hosts中正确设置了主机名。
是!这解决了这个问题。通过将我的主机名追加到/ etc/hosts中的这个内部IP行,我的问题就解决了。 谢谢! –