hosts file and 'fetch'

They have: 11 posts

Joined: Jun 2008

last week i encountered a problem where my server could not 'fetch' images. after going back and forth with my web host, they said it was because my server couldn't CURL images and fixed it by modifying the hosts file.

This was the original hosts file:

127.0.0.1 mydomain.com mydomain localhost localhost.localdomain

and here's the modifications they made to it:

127.0.0.1 localhost localhost.localdomain
70.32.90.182 mydomain.com mydomain

could someone help me understand why this fixed my problem? thanks!

pr0gr4mm3r's picture

He has: 1,502 posts

Joined: Sep 2006

It probably has something to do with Apache or whatever is serving your static files. If Apache virtual hosts is configured by IP address, sending your domain to the local loopback address would cause a problem.

They have: 11 posts

Joined: Jun 2008

Thanks pr0gr4mm3r. You're real prolific - answered 2 of my questions already!

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.