hosts_file

hosts_file

When you use the internal DNS implementation (the default), Squid always uses the DNS name servers to resolve names and addresses. The external dnsserver program, on the other hand, may check a local databasethe hosts filebefore querying the DNS. With this directive, you can make Squid preload the contents of a hosts file into its IP and FQDN caches.

Squid rereads the hosts file when you send it the reconfigure signal (squid -k reconfigure).

If you configure the append_domain directive, it's appended to any single-component names in the hosts file.

Syntax

hosts_file pathname

Default

No default

Example

hosts_file /usr/local/squid/etc/hosts

Related

dns_defnames, append_domain



    Appendix A. Config File Reference