Laravel Valet sites connection refused on port 80

ε祈祈猫儿з 提交于 2019-12-11 06:58:40

问题


Ever since Chrome and Safari started forcing HTTPS redirection on the .dev TLD I've been getting issues connecting to my Laravel Valet sites.

Without knowing that Chrome and Safari had done this, I updated Valet to from 1.2 and not thinking to check in Firefox first (doh! 😖). I've installed the latest stable release of Laravel Valet (2.0.6) on High Sierra (10.13.2), completely removed the running version of homebrew/php/php70 and reinstalled to be sure and have now changed the TLD to .test.

I can ping the domain without suffering any packet loss, however when I run

curl oldabp.test --verbose

I get

* Rebuilt URL to: oldabp.test/
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connection failed
* connect to 127.0.0.1 port 80 failed: Connection refused
* Failed to connect to oldabp.test port 80: Connection refused
* Closing connection 0
curl: (7) Failed to connect to oldabp.test port 80: Connection refused

I've also cleared the dns cache using the command found in this article, restarted valet and rebooted. I retested after each of these steps and the output remains the same.


回答1:


I found a stack overflow answer for a similar question here that did the trick. During the valet install step I noticed it installed and started nginx and I don't remember it restarting nginx in the numerous times I've called valet restart before despite it telling me that it had restarted successfully. It boils down to very odd behaviour which has been resolved.



来源:https://stackoverflow.com/questions/48053339/laravel-valet-sites-connection-refused-on-port-80

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!