Updating etc hosts
The hosts file is used to map hostnames (in other words domains) to IP addresses.
With the hosts file you can change the IP address that you resolve a given domain name to.
If you’re running docker-machine or boot2docker on OS X, chances are you want the Docker client environment variables set automatically when you log in to the terminal.
There’s plenty of help out there to achieve this, but the basic gist is to add the following to your prefix and port suffix.
I wanted to guarantee that requests coming from one of my servers going to a domain they host are routed to localhost.
The solution I arrived at was to generate a list of domains hosted under Nginx virtual hosts and dynamically updates , so go do this I wrote a bash script.
# Do not remove the following line, or various programs # that require network functionality will fail.
hostname is different from /etc/hostname and /etc/hosts openvpn cannot resolve host address Setting hostname through DHCP Timeout issues while trying to conect to an Open VPN server Fedora 25: KVM Network Bridge Issues Can't ping router (network unreachable) httpd issue Can't connect to internal URL Created a Xen bridge on F20 and networking will not start on boot...
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
Just if case you don’t know, the Hosts file is where you can manually enter a hostname and an IP address pair, thereby bypassing the DNS server.
This can be pretty useful in certain situation, especially for anyone in IT.