MAMP + Squid results in incorrect/invalid "doubled-up" address resolution

125 Views Asked by At

I can't figure it out for the life of me.

I have a laptop (Macbook Pro) that I'm using as a web server to develop Wordpress websites. MAMP Pro 3.0.5 is running on it to serve the sites. As well, I'm also using Squidman 3.3.9 as proxy so I can connect to the laptop with other machines or other devices (phones, tablets, etc.). Everything was working fine for a good long time, which has been since I set the whole thing up a few months back. Fast forward to today, and stuff's somehow busted.

Viewing sites from the laptop (which is where it's all hosted) all sites load and function perfectly fine. However when I try to connect to any of my host entries in MAMP from my desktop machine or whatever remotely, I get bizarre urls returned. Below is exactly what winds up in the browser's address bar when trying to navigate to "examplesite.com":

examplesite.comhttp/examplesite.com/

Character per character, that's exactly how it gets returned. The URL not only gets doubled, but there's a colon missing and forward slash missing.

Another funny thing is that when I go to the wordpress back-end for any of these sites, I can reach it just fine. So, at the same time as having busted root URLs, this somehow still works when I try to connect from a remote machine:

examplesite.com/wp-admin

Additional note: Even with static sites that are just stand-alone files (and not wordpress installations) I still get the same problem with the doubled-up, mangled URL. It appears to happen only when try to connect through a MAMP host address entry.

Anyone have any idea what could be going on? Again, everything used to work fine previously. Now, for some reason, it doesn't.

Many thanks in advance,

-- MP

1

There are 1 best solutions below

0
On

Ok, figured it out. On the device or machine that I was connecting to the proxy with, there was no port number specified.

(I guess that with no port number declared (to match the HTTP port specified in squid) somehow there was a double lookup that was going on. Maybe once when the root was hit, and then a second time when the port number was looked up. Perhaps? I'm still not totally clear why the ":" and the "/" were removed from the address though. Perhaps the slash or the colon are somehow escaping themselves.)