Skip to content

Instantly share code, notes, and snippets.

@auxcoder
Last active December 26, 2016 17:38
Show Gist options
  • Save auxcoder/175b1d668677b2566e8ffe15265d4382 to your computer and use it in GitHub Desktop.
Save auxcoder/175b1d668677b2566e8ffe15265d4382 to your computer and use it in GitHub Desktop.
Solving issues with virtual host in MacOS

Virtual host entry in /etc/hosts

127.0.0.1	testwp.dev www.testwp.dev

When try to see it in browser respond with: testwp.dev refused to connect

Check doing a ping and works

ping testwp.dev
PING testwp.dev (127.0.0.1): 56 data bytes

Check with curl and fails.

curl -I -L testwp.dev
curl: (7) Failed to connect to testwp.dev port 80: Connection refused

Seem like the issue is related to post forwarding, if stop it then works.

sudo pfctl -d

I found the trick here .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment