Search code examples
dnsmamphostname

MAMP Pro changing Server Name results in Access Denied error


All,

I have MAMP Pro 3.4. I have a virtual host 'mysite.local' running on the standard MAMP port 8888. I'm running Apache/MySQL server as my user (not WWW). Everything works.

But when I change the host name in MAMP to anything else (like 'localmysite', restart the servers and reload the site in Chrome, I get:

"Access Denied (policy_denied) Your system policy has denied access to the requested URL." 

When I view the Hosts file from MAMP, it looks like MAMP correctly updated the host file:

127.0.0.1   localmysite # MAMP PRO - Do NOT remove this entry!
::1     localmysite # MAMP PRO - Do NOT remove this entry!

But it simply doesn't work. When I change the host name back to 'mysite.local' and restart the servers, it works again. What is wrong and how do I fix it so I can change the host name?

Thanks.


Solution

  • OK, after a lot of trial and error I figured out what was going on. It was a proxy server problem. My machine is connected to a corporate proxy server, and that server was attempting to interpret "localmysite" and failing to allow it.

    In Chrome, I simply had to go to:

    Settings->Advanced->Change proxy settings->Bypass proxy settings for these Hosts & Domains.

    Then add "localmysite" to the list of sites that will bypass the proxy server.