Laravel valet It works

走远了吗. 提交于 2019-12-03 12:29:51

"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

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

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.

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