Laravel valet park shows XAMPP main page

2k views Asked by At

I am currently learning PHP Laravel. I am in the process of setting up valet. However, I encountered a problem. Whenever I type (filename).dev, it shows the XAMPP main page instead of the Laravel initial project page. Can someone explain why this is happening?

2

There are 2 answers

0
Lvkz On BEST ANSWER

The original answer can be found here.

  • Remove valet completely (some reason valet uninstall does nothing) so to get the latest version (v1.1.3 at the time)
  • Stop Apache: apachectl stop
  • Update Valet: composer global require laravel/valet
  • Install Valet: valet install
  • Restart Valet: valet restart

With some others, it might be a good option to try and simply turn-off/stop your locally running Apache, as this as others might find is only the issue that fixes it.

0
Saad On

I faced the same issue as I was running Xampp and Valet at the same time on my Windows Machine, try turning off the xampp/apache and run the page again.

Steps to install Valet on Windows..

  1. Install composer from https://getcomposer.org/download/
  2. Then run composer global require cretueusebiu/valet-windows
  3. Then run: "valet install"
  4. Open your Laravel project directory in cmd (administrator mode)
  5. Then run: "valet park"
  6. Then run: "valet link"
  7. Then run: "valet secure" (if you want your website to be secured by TLS)
  8. In the control panel/network and sharing center choose the active connection and in its properties enter 127.0.0.1 in TCP/IPv4 IPv4 settings
  9. In the control panel/network and sharing center choose the active connection and in its properties enter ::1 in TCP/IPv6 IPv6 settings
  10. Then run: "valet start"
  11. Enter the "projectname" followed by ".test" in the browser. For example: if your project name is demolaravel, then run demolaravel.test in the browser