I am having issues with setting up Laravel Valet on my machine (MacOS Mojave 10.14). I followed the official documentation on Laravel documentation site. I have installed Valet, added Composer to path, I can run valet
and laravel
commands from anywhere in the system so that works. I have mapped my project folder with valet park
. I can also do a ping on any *.test
domain and it returns 127.0.0.1
responses.
I have created a new project laravel new blog
within that directory and when accessing http://blog.test
I am getting nginx 403 forbidden response.
I suspect something may conflict maybe so I tried these steps, none of which worked:
blog
and blog/public
to valet link blog
and valet link blog2
. Accessing blog.test
and blog2.test
both return forbiddensudo apachectl stop
returns:/System/Library/LaunchDaemons/org.apache.httpd.plist: Could not find specified service
sudo killall httpd
returns:No matching processes were found
Uninstalling nginx and running valet install
again didn't help.
Running sudo nginx
returns:
nginx: [emerg] bind() to 0.0.0.0:80 failed (48: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (48: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (48: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (48: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (48: Address already in use)
nginx: [emerg] still could not bind()
NOTE: I do have a Docker running on my machine
I have found Docker to be the issue. I already had an app running on port 80 so it was preventing nginx from starting. I shut down the container and run sudo nginx
and it solved the issue.