Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel Valet - This Site Can't Be Reached

I have successfully followed the Setup a Mac Dev Machine until this tutorial: https://laracasts.com/series/setup-a-mac-dev-machine-from-scratch/episodes/10?autoplay=true

The problem is that when I go to SITENAME.dev, nothing shows up. Instead, I get the following message:

This site can’t be reached

test2.dev refused to connect. Did you mean http://test2.de/? Search Google for test2 dev ERR_CONNECTION_REFUSED

I've tried this both for a laravel install (using the laravel installer) and a wordpress install. Neither one works.

Any idea why it is not working. I have followed the course step-by-step as well as the comments. For instance, I modified the .zshrc file as follows based on the course and comments:

export PATH=$HOME/bin:/usr/local/bin:$HOME/.composer/vendor/bin:$PATH

And, in case it is relevant, I am on Mac Sierra (freshly updated).

In short, where Jeffrey is able to get a home page of laravel, I get an error.

Any idea how to fix this?

Thanks.

like image 415
Moshe Avatar asked Aug 11 '17 15:08

Moshe


3 Answers

Go to your site folder and execute the following commands:

cd your_project
composer global update
valet uninstall
rm -rf ~/.valet
rm -rf ~/.config/valet
valet install
valet link
valet open

It fixed this issue for me.

like image 74
DevonDahon Avatar answered Nov 02 '22 15:11

DevonDahon


Mac os mojave - version 10.14, cd in your-project-folder-name and run valet secure your-project-folder-name

like image 29
Shimax s Avatar answered Nov 02 '22 16:11

Shimax s


Solution:

composer global update
brew upgrade nginx
cd your_project
valet start

For more details read this blog https://medium.com/@panjeh/valet-this-site-cant-be-reached-err-connection-refused-ad424ea1e343

like image 2
panjeh Avatar answered Nov 02 '22 14:11

panjeh