1

I'm a web developer and do local development through apache2 on localhost. However, sometimes when going to remote websites, well known websites like sky.com or bbc.com instead of loading that website Chrome will attempt to load the page from localhost (the browser will display whatever site I'm developing locally). After hitting reload a few times or pressing enter a couple of times in the address bar it will sometimes decide to load the remote version, but not always.

If the address is https then it always works (but then I'm not developing https sites locally either).

In the address bar it still has the remote address, but the page displayed is from localhost, or a "not found" page.

3 Answers 3

1

Just found that disabling apache2 appears to work around it:

sudo /etc/init.d/apache2 stop

That's not a fix, however, since it should all work fine when apache2 is running

1

It sounds suspiciously like you've inadvertently set your browser's proxy setting to localhost:80. Certainly worth a check. Some options:

  • Look at the settings
  • Try another browser
  • Try something command line with verbose output:

    wget -SO/dev/null http://www.sky.com/
    

    You're looking for successful connections (and more importantly, where it's connecting).

  • Try connecting directly to the IP.

I don't think this could be a /etc/hosts or other DNS-resolving issue as that would be a permanent issue.

1

This can happen if your using LiveReload or something like it to auto load dev sites. Disable your extensions and try again. Also check your hosts file to make sure your not doing something silly, and if you have enabled the "slow your network down to test real access to slower pages" 'adjustments' make sure you turn them off.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .