Squid在重启时出错提示“NOT Determine....”

不知为何,在修改了主机名后,squid有时重启的时候会出现如下错误提示:

Stopping squid: 2012/12/06 00:08:48|

WARNING: Could not determine this machines public hostname. Please configure one or set 'visible_hostname'.

  后来在网上找了很多方法,其中下面这个会有效:

  • The hostname may not be set.

  • The hostname may be missing from the DNS zone or /etc/hosts files.

  • The Squid system's DNS client configuration may be incorrect or missing. On Unix, you should check the/etc/resolv.conf and /etc/host.conf files.

If you see the fatal message mentioned previously, you need either to fix the hostname and DNS information or explicitly configure the hostname for Squid. In most cases, it is sufficient to ensure the hostname command returns a fully qualified hostname and add an entry to /etc/hosts. If that doesn't work, just set the visible hostname in squid.conf:

visible_hostname squid.packet-pushers.net(#vim /etc/squid/squid.conf添加即可)


原文地址:https://www.cnblogs.com/sbaicl/p/2804236.html