0

I'm learning Laravel, and I successfully installed Valet. Did some basic development. Then moved on to other things totally unrelated. About a week later (today) I visited two sites (in Chrome and Safari Mac):

  • postmarkapp.com
  • getsatisfaction.com/activeinbox

And I get "Valet - Page Not Found".

I do not get this issue any other website I visit. And I've never seen something selectively take over a site like this. It's obviously related to my local configuration but because I'm new to Valet I have no idea where to start with this.

  • What is happening?
  • How is this possible?
  • How do I resolve this?
Spencer Hill
  • 1,043
  • 2
  • 15
  • 38

3 Answers3

1

What is happening?

Your network configuration is pointing those domains to valet instead of looking them up through external name servers.

How is this possible

Laravel Valet uses dnsmasq so you don't have to worry about editing your /etc/hosts file for each dev site you create. It can step in and provide ip resolution before looking externally for an ip address.

How do I fix this

From a terminal run:

valet domain test
valet restart

My guess is you changed your domain on valet to com and the reason other sites are working is their ip addresses are already cached locally.

wheelmaker
  • 2,975
  • 2
  • 21
  • 32
  • Thank you. This all makes a little more sense. I ran the `valet test` on those two domains and receive "Command X is not defined." Restart executes successfully but the issue persists. Any other ideas? Thank you for your time. – Spencer Hill Sep 30 '18 at 00:38
  • what exactly did you run? it should be `valet domain test` exactly like that, not adding your own domain – wheelmaker Sep 30 '18 at 00:42
  • it wild cards whatever you put at the end of that command... so it will send anything from *.test to valet – wheelmaker Sep 30 '18 at 00:43
  • @SpencerHill any luck? – wheelmaker Sep 30 '18 at 06:26
  • Thanks, @wheelmaker, I ran "valet postmarkapp.com test" for example originally. But I just ran "valet domain test" literally and it definitely produced a different result in the CLI but these domains are still not accessible. And now it's affecting more domains. Like it's growing or something... Help! – Spencer Hill Oct 01 '18 at 17:07
  • I had previously reported the solution was to change my DNS from 8.8.8.8 to anything else, such as 1.1.1.1 because it appeared to be getting filtered. But I have since discovered that didn't resolve the issue, although it has to be related somehow because switching it back gets me the same domains with the same result. I thought this issue had disappeared but it did not. Although, now it's occurring with other domains. Today it's https://www.techspot.com/article/1357-customize-chrome-new-tab-page/ – Spencer Hill Oct 13 '18 at 00:07
0

In your project directory, you will need the public folder.

To get this, copy the public_html and duplicate it.

Proceed to rename it to public

If it's a new project, create the .env file and run php artisan key:generate

Then valet restart and you'll be good now.

0

Make sure the public/index.php exists and has not been deleted by mistake.

Nabil Kadimi
  • 10,078
  • 2
  • 51
  • 58