View Full Version : /etc/hosts not being respected?

06-05-2007, 11:23 PM
Did a search on the forums and got nothing here, so I'm wondering how this is possibly happening to only one person, but it seems that /etc/hosts isn't being respected....

Background: a lot of my legacy code uses various database hostnames, such as db.nerdbucket.com, bc-db.nerdbucket.com, etc. I generally keep my db info in a central location per app, but as I have around 10 different databases, and some apps hitting multiple databases, it's a pretty annoying task to go in and fix every place that references an invalid db host.

So I changed /etc/hosts, and added lines like this: clue-db.nerdbucket.com

But my server still doesn't recognize the host:
[etc]$ ping clue-db.nerdbucket.com
ping: unknown host clue-db.nerdbucket.com

I decided to try something really simple, so I aliased "foo" to as well, and had the same error. Anybody seen this before? I'm not a linux guru, but I thought I knew how to use /etc/hosts pretty darn well....

06-08-2007, 05:23 AM
No tamales here either. Guess you'll have to setup sub-domains for them all :-/

Here's what support had to say:

As far as I am aware, the /etc/hosts file is only recognized locally within the individual VPS. For example, mapping test.domain.com to in /etc/hosts would only map test.domain.com to that address from within the VPS, it would not be accessible via the web or for any external connections, although I'd have to check with one of our systems administrators to get more information on how /etc/hosts is "supposed" to work on our system. The subdomain solution is what I would suggest.

PS I see that you've decided to leave Westhost.

Bad host! 2007-06-07 The Nerdmaster

Well, after spending a good long while dealing with Westhost, I've concluded that for what they offer, they're just not very good. I was looking at all kinds of Apache and sendmail configuration in order to get things up and running, and that's the main reason I avoided linode's servers for so long. So pretty much Westhost is a great in-between solution for people who need a little more flexibility than a traditional shared host.

I am apparently beyond that level, which means I have to look into linode and building my own server. Bleah. In the meantime, I'm back on Dreamhost, which means BC will likely be a little quirky. Oh well.
hopefully those guys at Dreamhost can fix your problems :D

06-08-2007, 01:55 PM
hopefully those guys at Dreamhost can fix your problems :D

Don't even get me started on Dreamhost. I may be a bit too harsh on Westhost (I was extremely frustrated), but Dreamhost is just crap.

(EDIT: Just fyi, the reason I'm with Dreamhost is I prepaid for their "excellent" service a while back and still have a couple months left. They're great for static sites, but once you write anything that uses more than a few minutes of CPU in any given day, you're screwed)

My problem seems to be that I want to have my cake and eat it too. I want to be able to set up all kinds of apps in ruby on rails, with some custom apache config, custom sendmail options for doing sort-of weird things with my email, etc. But I don't want to have to configure it myself.

So I am probably going to get a linode account and spend way too much time learning to administer a web server. It's not that westhost is so terrible that I can't use them, it's just that if I have to do a lot of config, I may as well get a guaranteed amount of RAM, fewer users per system (40:1 contention ratio on the $20 account), etc.

I would like to thank westhost support, however. They were pretty helpful even if they can't work miracles in my semi-unusual situation.

06-09-2007, 06:20 PM
That's the problem with text. It's very hard to convey one's true feelings somethimes.

I can't comment on the Westhost's CPU and RAM utilization rules as their terms and conditions are very woolly on that front. However, it appears that the more you pay, the more tolerant they are (which is what your would expect). In theory you can use all the server's resources if nobody else on your server wants them, which is why the rules are so vague.

The Westhost plans which might suit you are the Business Value ($12.95, 50 subdomains) and Business Pro ($24.95, unlimited subdomains) or maybe even a Reseller plan ($25.95). From what I can see, the main advantage of linode ($19.95) is true root access and choice of distro, but you pay more for less storage and bandwidth. Westhost's contention is unknown, but I estimated it at around 260 sites per server a few months ago.

I wonder why Westhost have nothing between $12.95 and $24.95? I'm sure there's a market for $20 plans ;)...

06-14-2007, 01:36 PM
I wonder why Westhost have nothing between $12.95 and $24.95? I'm sure there's a market for $20 plans ;)...

I agree there is a market for $18-20 plans. But I think the major reason for the cost difference between the Business Value and Business Pro plans on WestHost is the cost of Miva (which is a fairly expensive program) and support for it (which is very time consuming), and the resource usage of Tomcat and Helix.

06-15-2007, 02:16 PM
Bleah. I've cancelled here (as should be obvious by now), but definitely doing all admin is a big pain. I revise my prior statement about westhost. They definitely have a great place as an in-between server, I just needed the extra control and resources, and am now paying the price (my time) of getting that level of control.