blog.test not showing welcome page with valet on laravel

1.2k Views Asked by At

I am very new to Laravel. I have created a local development site blog.test using command laravel new blog on MacOS following documentation in Laravel site.

When using command php artisan serve in ~/Sites/blog folder then blog.test is showing Laravel welcome page, but when I am using valet for development then blog.test is showing It Works.

Please help solve this issue. What is the missing step?

I already tried below steps

  1. valet reinstallation
  2. valet restart
  3. valet link

it seems that blog.test is pointing to default index.html file of web server instead of index.php file in blog/public folder of Laravel project.

Do I need to configure the web root directory to blog/public or "valet link" command should take care of this itself?

2

There are 2 best solutions below

1
On

"It Works" suggests to me that the Mac's built-in Apache server is handling that request. You just need to disable it in order for Valet to take over.

Run sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist to turn off the built-in Apache server.

You might also have to restart Valet valet restart afterwards.

0
On

I stopped apache using below command

sudo apachectl stop
and after that I followed below thread

https://github.com/laravel/valet/issues/299

It was problem with dnsmasq and dnsmasq.conf file given in thread solved this issue.