I\'m trying to install Laravel valet
but I keep getting (when I visit domain.dev):
It works!
I already tried a lot. For example:<
No need to stop Apache, and it doesn't have anything to do with Homestead.
The answers provided solve your problem but they are not good.
You can simply run
valet port 8888
(or whatever port you want) and get your site on domain.dev:8888
The point is not that Apache and Nginx don't like each other, they are agnostic of each other, just keep them listening on different ports.
So many different combinations of what to do here
Here is what worked for me.
Turn off other local Apache altogether
sudo apachectl -k stop
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
Remove the Valet directory altogether
rm -r ~/.valet
Removed Valet via composer globally
composer global remove laravel/valet
Re-install via composer
composer global require laravel/valet
Install Valet
valet install
Go to Folder to Add directories
cd ~/Sites/
Then add projects to park
valet park
Change Valet domains to something else to stop urls forcing to https://
valet domain app
Change directory into the project folder
cd ./laravel-project/
Then open current project
valet open
The browser should open to http://laravel-project.app
"It works!" will always be a message from Apache. Apache has to be turned off for Laravel Valet to work.
I see you have tried these before:
$ stop apache (apachectl stop)
$ sudo apachectl -k stop
I had the same problem. Try with the command below and then after be sure to restart valet again! This fixed it for me:
$ sudo apachectl stop
$ valet restart