Laravel Valet not working. 127.0.0.1 Connection Refused
Asked Answered
L

2

3

Telnet on 127.0.0.1 doesn't work

127.0.0.1 connection refused

Trying to get the valet setup working. It appears when accessing 127.0.0.1 the connection is refused which is the message I get when I go to one of the *.dev sites setup. I've made sure apache is stopped and have been Googling all over the place and unable to find a solution.

Has anyone come across this or have any ideas on what to try next? I previously had httpd22 installed but I've now uninstalled this with brew which changed the 127.0.0.1 from responding with a list directory of /Users/Rick/Sites to now connection refused.

Lailalain answered 12/7, 2016 at 20:54 Comment(4)
Let me make sure I'm understanding. You uninstalled HTTPD and want to know why nothing is listening on port 80? It seems fairly obvious, at least on the surface. What's confusing is that you can do it via IPv6. Given then, that something IS actually listening, are you up against a firewall, perhaps?Mcgruder
UBER:vue RickBolton$ sudo lsof -n -i:80 | grep LISTEN caddy 59 root 3u IPv6 0x800172de4f5ed877 0t0 TCP *:http (LISTEN)Lailalain
Is what I get when I check what's listening on port 80Lailalain
Apache and Ngnix aren't needed for Laravel Valet and it uses a caddy driver but it seems the issue of IPv4 not listening perhaps?Lailalain
L
1

Fixed this. I followed a guide a while back to get a local dev setup and the issue was I had a .plist xml file within /Library/LaunchDaemons that forwarded port 80 to 8080 for 127.0.0.1.

The Run with Port 80 on this guide has caused me hours time trying to solve this one haha:

https://echo.co/blog/os-x-109-local-development-environment-apache-php-and-mysql-homebrew

Lailalain answered 12/7, 2016 at 23:4 Comment(0)
C
0

I had a similar connection issue between Valet and Nginx and fixed it by manually uninstalling and reinstalling Valet, found in this Stack Overflow answer:

$ rm -rf ~/.valet
$ brew unlink nginx && brew remove nginx
$ brew unlink php56 && brew remove php56 && brew uninstall --ignore-dependencies php56
$ brew unlink php72 && brew remove php72
$ brew unlink dnsmasq && brew remove dnsmasq

With a clean slate, I was able to successfully install a working Valet environment.

Cochleate answered 13/4, 2018 at 17:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.