Closed indreklasn closed 5 years ago
Did you make sure to restart the services? sudo brew services restart (nginx|php71)
?
@joshmanders yes I tried that, does not fix.
I've usually seen that if anything else was running on port 80 prior to installing valet then even killing the previous process might not be enough ... but a reboot magically solves it all. Strange I know, but has been the solution for several.
@drbyte http://d.pr/i/WmPF/23IzKuLy Here's my port 80 stuff. No apache running..tried rebooting, nothing works.
I'm pretty dried up on what might be causing this, thus the desperate issue.
I also encountered this problem, you can go to tracking problem as I thoughtEnter the user home directory /. Valet/Log
$ cd /Users/chenghuiyong/.valet/Log
$ tail nginx-error.log
@bravist
The .log
file is empty =(
@wesharehoodies, try to reinstall the valet or your project
I have the same issue , I have even reinstall valet and stoped apache but still not working
Sorry, can't help, didn't get it to work properly. 😞
Try with
valet uninstall valet install valet link brew services restart --all valet restart valet open
Best of Luck !
I'm having the same issues and none of the above works. There is another user on this machine who has Valet installed so could it be related to multiple users?
If Valet installed on Separate users /home directory then there should should be no issue
There should be no issue, but there definitely is. I've now managed to get it working on my user account but it looks like the other user can only access my sites. Despite having their own ~/.valet
folder and configuration. I guess the 404 comes from the fact that it's using another valet installation and can't find the requested project.
I tried restarting valet, the homebrew services and reinstalling on the other account. Nothing worked.
archy-bold is right having two users on the same machine both with Valet causes an absolute nightmare. I ended up deleting one user, chown all /usr/local folders back to main user then reinstalling brew services and valet.
I still had problems ping test.dev not found. Turns out /usr/local/etc/dnsmasq.conf had references to my old users dnsmasq.conf file deleting this now all working. I think this conf file may have contributed to the 404 issue to start with but i can't be sure.
Found this info on https://stackoverflow.com/questions/37172691/valet-laravel-dns-address-can-not-be-found
Having the same issue with multiple users, can't seem to figure it out.
I am having this issue for a CakePHP 3 application
I did valet park in the parent folder of the application and I am getting
However, it does work for a laravel application, I am wondering if this is a driver issue, maybe the driver needs to be specified somewhere?
I had the same issue, tried every single solution above, without success.
PHP 7.1, High Sierra
I solved by unlinking all domains and very important: cd parent/my-project && valet link my-project
. Before that, I did cd parent && valet link my-project
which was wrong.
Use valet links
to monitor your actual paths
@alexgiuvara Thank you. The link issue was what causing my 404s.
If anyone is still having an issue, I just had this issue with Craft3, what I did is I went to the web folder inside the root folder of the craft project, ran valet link
@alexgiuvara thanks mate your linking tip solved it for me.
@alexgiuvara Thank you! Solves my problem. I'll add this here to be more explicit in case it helps someone else. If you've previously run:
cd parent && valet link my-project
then do
cd parent && valet unlink my-project
. That'll clean up previous, incorrect link and then run
cd parent/my-project && valet link my-project
per @alexgiuvaras's tip.
Try valet links
to see your project path, and valet link
again.
Yep. I had issue on Mojave.
You can unlink your project wrong link path project.
Example: Park path: path_to/projects
and project path path_to/projects/laravel
Step by step
cd projects
valet unlink laravel
cd path_to/project/laravel
valet link laravel
valet restart
DONE.
I believe this issue can be closed.
It discusses 3 things, all of which are closed:
I also found that if you prefix your site domain with "www." it may not work. For example : www.mysite.test does not work, but mysite.test does.
Anyway, I think valet automatically handles the www subdomain when creating a site.
I got the same problem and solved by.. cd ~/.composer/
sudo chown -R $(whoami) vendor
I got the same problem and solved by.. cd ~/.composer/
sudo chown -R $(whoami) vendor
Or even better:
sudo rm -rf ~/.composer/vendor
composer global update
(I say "better" because if you've got a mishmash of permissions problems in that directory, then you've probably also got other problems, and clearing it all and reinstalling stuff is more thorough.)
if you are trying to link normal php folders ( no framework ) you must specify the file and the file ending example :http://phpinfo.localhost/info.php
please rename your project if it contains underscore. i found it the hard way though.. hope this will help someone else.
example project name: my_project rename it to: my-project
valet unlink my_project
valet link my-project
-> cd path/to/your/project/folder -> valet link
cd into your project folder. In my case this was the folder that contained all my WordPress files and folders (root of my website) and run "valet link". I tried other ways, but this was the only one that worked for me.
please rename your project if it contains underscore. i found it the hard way though.. hope this will help someone else.
example project name: my_project rename it to: my-project
valet unlink my_project valet link my-project
Thanks for the notice. _ is really a problem.
I've just renamed project name in the Nginx configuration, certificates issued for it, symlink in .valet/Sites. So actually where the project is located /var/www/project_name is with an underscore, but elsewhere name is merged. valet:links gives
+-------------+-----+--------------------------+-------------------------+
| Site | SSL | URL | Path |
+-------------+-----+--------------------------+-------------------------+
| projectname | | http://projectname.test | /var/www/project_name |
+-------------+-----+--------------------------+-------------------------+
And it's working!
use valet links
to check the registered links
I had that issue, my mistake was so funny, I simply had the following folder structure:
sites -> project.
under the project folder, I have the api folder and front folder.
I had to apply link on the api, but I was applying it on the project folder. valet links
helped me discover the problem.
The linked directory should have an index, having it exists with sub folder(s) is not enough
In my own case (Vanilla PHP project), public
folder was the cause of my issue.
Inside my project folder, I have a public folder that houses all my assets.
Turns out the valet driver checks inside the public folder for index.php
which makes sense because that's how Laravel is configured.
So I had to rename the
public
folder that house all my assets toassets
.
You can rename it to whatever you want.
I got the same problem and solved by.. cd ~/.composer/
sudo chown -R $(whoami) vendor
this is the only solution from here that worked for me. I had tried park/unpark, link/unlink, secure/unsecure, reinstall, restart, everything else in the book. Only setting these proper permissions fixed it for me. I have a similar problem in another laptop so will try there too. Thanks a lot.
For those of you who are having this issue because of multiple Users. This solution solved it for me:
Create a Sites directory in the second user account at /Users/username/Sites and put my sites into that, then just head back to my main (admin) account where Valet is installed and run...
$ cd /Users/username/Sites $ valet park ... and I can now access any websites I park in that folder.
composer global update
Finally I have
In my own case (Vanilla PHP project),
public
folder was the cause of my issue.Inside my project folder, I have a public folder that houses all my assets.
Turns out the valet driver checks inside the public folder for
index.php
which makes sense because that's how Laravel is configured.So I had to rename the
public
folder that house all my assets toassets
.You can rename it to whatever you want.
Finally, I have resolved this. Thank you so much. My project was running and suddenly I went to share my project using valet share. I am assuming it creates a conflict with public folder available on my project.
Hello
After three attempts trying to get Valet to work I'm turning here for help. Here is my setup:
I even tried using configurating the .pow and it still does not work. Any clues? I killed my apache (free up port 80), reinstalled everything 3x times and yet not working.
Anyone smart enough to figure out why this is happening?