Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 404s new Laravel Setup + WP CLI Valet #15

Closed
jasperf opened this issue Dec 12, 2016 · 5 comments
Closed

Error 404s new Laravel Setup + WP CLI Valet #15

jasperf opened this issue Dec 12, 2016 · 5 comments

Comments

@jasperf
Copy link
Contributor

jasperf commented Dec 12, 2016

I have the new setup with Laravel - uninstalled all following instructions at https://laravel.com/docs/5.3/valet - with now NGINX running instead of Caddy. Nice upgrade by Valet.

brew services list
Name    Status  User   Plist
dnsmasq started root   /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
mariadb started jasper /Users/jasper/Library/LaunchAgents/homebrew.mxcl.mariadb.plist
nginx   started root   /Library/LaunchDaemons/homebrew.mxcl.nginx.plist
php70   started root   /Library/LaunchDaemons/homebrew.mxcl.php70.plist

wp valet works:

wp valet new video-tuts --project=bedrock
Don't go anywhere, this should only take a second...
Success: video-tuts ready! https://video-tuts.localhost

But I cannot load the site getting Valet 404s

Request URL:https://video-tuts.localhost/
Request Method:GET
Status Code:404 
Remote Address:127.0.0.1:443

Valet logs only show things from the day before:

Jaspers-Mini:Log jasper$ pwd
/Users/jasper/.valet/Log
Jaspers-Mini:Log jasper$ tail access.log 
91.196.50.33 - [10/Dec/2016:17:05:13 +0300] "GET /server.php HTTP/1.1" 404 233
177.85.188.251 - [10/Dec/2016:17:24:38 +0300] "HEAD /server.php HTTP/1.0" 404 0
::1 - [11/Dec/2016:05:28:57 +0300] "POST /server.php HTTP/2.0" 200 23

nginx-error.log is empty:

Jaspers-Mini:Log jasper$ tail nginx-error.log
Jaspers-Mini:Log jasper$ 

Any ideas?

@aaemnnosttv
Copy link
Owner

This looks like an issue with Laravel Valet v2, not the wp command. There are a few known issues around 404s with WP using the new version.

I would take a look at the issues over on the valet repo and see if any of those sound like what you're seeing.

@jasperf
Copy link
Contributor Author

jasperf commented Dec 12, 2016

Yeah, OK. Well , setting domain once more, restarting and starting from scratch seems to have done the trick. All good now. Thanks!

@jasperf jasperf closed this as completed Dec 12, 2016
@cdils
Copy link

cdils commented Apr 13, 2018

I know this issue is closed, but thought I'd drop a comment in case someone is struggling with this. After running wp valet new mysite, be sure to cd into the mysite directory and run valet link. That fixed the 404 issue for me.

https://laravel.com/docs/5.6/valet#serving-sites

@jasperf
Copy link
Contributor Author

jasperf commented May 8, 2019

@cdils Great tip. Should be added to readme @aaemnnosttv

@aaemnnosttv
Copy link
Owner

This is similar to #22. Valet supports "parked" directories, that is - a parent directory in which all children directories are considered sites in the same way as a "linked" site, automatically. This is a powerful feature which eliminates the need to do this automatically. There is some value in adding it as an option which is what that issue is requesting and it will likely be added in the future, I just haven't had a chance to do it. In the meantime, I'm happy to consider PRs for updates to the readme or properly implementing #22 as a feature.

jasperf added a commit to wpvillain/wp-cli-valet-command that referenced this issue May 10, 2019
See aaemnnosttv#15 where we ran into 404 issues due to not having done a valet park in the directory the installation was done nor a `valet link`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants