Laravel valet It works

一个人想着一个人 提交于 2019-12-09 09:53:56

问题


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:

remove valet 
stop apache (apachectl stop)
composer global require laravel/valet
valet install
valet restart

But that does not work for me. I've also installed Laravel Homestead in a vagrant box. Perhaps that has something to do with it? I can visit my Homestead sites.

How can I fix this problem?


回答1:


"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



回答2:


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




回答3:


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.



来源:https://stackoverflow.com/questions/39708139/laravel-valet-it-works

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