Koozali.org: home of the SME Server

Sqid causing domains to be unreachable?

Offline ianhobson

  • **
  • 28
  • +0/-0
Sqid causing domains to be unreachable?
« on: February 02, 2009, 01:41:51 PM »
I develop web sites for others, and I regularly mount them on a name based web server, using a temporary domain. This temporary domain name is NOT in DNS, so my customer and I add it to our local hosts file. Then we can view the pages, without our half done work being made public or getting scanned by the search engines.

Using SME server 7.4 with the HTTP proxy disabled, this works just fine.

With the HTTP proxy enabled, I get a "Unable to determine IP address from host name for <domain>" error from squid withing my SME server.

Why does this happen? I would have expected my browser (Firefox) to use windows and therefore the hosts file to determine the IP - just like ping does. (I can ping the temp domain.) As squid will be told both IP and domain in the GET request, why is SQUID looking the IP up again?

Is it possible to I get hosts working with SQUID? My wife is moaning about poor responses from the internet since I turned it off.

I've spent some time on Google looking for answers, but I'm not sure what to search for.

Regards

Ian

Offline mmccarn

  • *
  • 2,656
  • +10/-0
Re: Sqid causing domains to be unreachable?
« Reply #1 on: February 02, 2009, 02:59:24 PM »
With squid enabled, the SME server needs to be able to look up the host name - so adding an entry to the workstation's 'hosts' file doesn't help.

To fix this you need to either
* configure your SME server to bypass the squid proxy for all web requests to your development server (see http://wiki.contribs.org/Firewall#Bypass_Proxy)

or

* configure djbdns on your SME server to be able to find your temporary web addresses.  You may be able to do this from server-manager by creating a new domain, then creating a host for the new domain that matches your temporary hostname and specifies a remote address.  If not, you may need to create a custom template fragment for the dns service.


Offline ianhobson

  • **
  • 28
  • +0/-0
Re: Sqid causing domains to be unreachable?
« Reply #2 on: February 02, 2009, 03:40:56 PM »
Thanks mmccarn.

I installed the Bypass_Proxy fix and it works just fine now. :)

Ian