Comments on: If You Like Living Dangerously Modify Your Hosts File https://simpleprogrammer.com/if-you-like-living-dangerously-modify-your-hosts-file/ Mon, 05 Aug 2013 02:17:19 +0000 hourly 1 https://wordpress.org/?v=7.0 By: Nathan https://simpleprogrammer.com/if-you-like-living-dangerously-modify-your-hosts-file/#comment-272 Mon, 10 Jan 2011 20:30:30 +0000 https://simpleprogrammer.com/?p=1002#comment-272 I agree that in the scenario you give, it is a bad idea. You should NEVER rely on hosts file modifications to perform updates. However, I completely disagree on your premise that any modification of the hosts file is bad. If you are using a hosts file edit for read-only purposes, it can be extremely helpful. The only complication that can occur using your scenario would be that the developer would still be looking at his test environment and not production if he forgot to remove the hosts file entry. Not exactly detrimental, and still helpful during dev testing.

]]>
By: Doug Vanderweide https://simpleprogrammer.com/if-you-like-living-dangerously-modify-your-hosts-file/#comment-271 Fri, 16 Jul 2010 16:47:48 +0000 https://simpleprogrammer.com/?p=1002#comment-271 I like to set up a sandbox Web server as a virtual host listening on a different port of the same domain.

So, if I had wonkywares.com, which listens on the default port 80, I would clone a virtual server, then have it listen on port 90. Then, if I need to access the sandbox, I just visit http://www.wonkywares.com:90.

Also, if one has control of his DNS records, he can simply set up a CNAME entry for the subdomain, and have that route wherever he wants; it’s the same net effect as making a hosts file entry of the sort you describe, e.g., test.wonkywares.com vs. http://www.wonkywares.com

Of course, these solutions all require one to have complete control of either his domain names or his Web server.

But in the age of Moore’s Law, finding providers who give you either isn’t hard. GoDaddy lets you do anything you want to a DNS record; they’ll even rent you a virtual server for $30 a month.

]]>
By: Brian https://simpleprogrammer.com/if-you-like-living-dangerously-modify-your-hosts-file/#comment-270 Fri, 16 Jul 2010 16:11:50 +0000 https://simpleprogrammer.com/?p=1002#comment-270 I’ve found that ‘clever’ is often an indicator that something is a bad idea. Its probably due to the fact that ‘clever’ often implies some form of hack.

]]>