简体   繁体   中英

Unable to access Laravel Breeze app site using Valet URL

I have a Laravel Breeze (Vue3, Laravel 9, InertiaJS) site installed, and had it working fine with Valet, but after changing the project directory name, I have run into a myriad of problems just getting the site to even come up.

I had run brew update , and it upgraded the php version to the latest, which is 8.2, and Valet seemed to quit working. Doing some research, it seemed that Valet has issues with 8.2, so I uninstalled php and went back to 8.1 (the php@8.1 formula). I even went so far as to uninstall/reinstall valet via composer, and also dnsmasq and nginx via homebrew.

However, with all that, I cannot get my Breeze site to come up with Valet. My site is installed at ~/Sites/laravel/members and there are other sites under /laravel , so I ran valet park in ~/Sites/laravel . That seems to have taken effect, because when I run valet parked , it shows my site

| Site      | SSL | URL                   | Path                                 |         |
+-----------+-----+-----------------------+--------------------------------------+---------+
| .idea     |     | http://.idea.test     | /Users/steve/Sites/laravel/.idea     | php@8.1 |
| members   |     | http://members.test   | /Users/steve/Sites/laravel/members   | php@8.1 |
+-----------+-----+-----------------------+--------------------------------------+---------+

Within my .env , I have APP_URL=http://members.test , and when I run npm run dev it starts vite just fine:

  VITE v3.2.4  ready in 931 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose

  LARAVEL v9.41.0  plugin v0.7.1

  ➜  APP_URL: http://members.test

However, accessing http://members.test just gives a We can't connect to the server at members.test. error message, and if I go localhost , I get the Vite landing page.

The only things I can see are these: if I run brew services list . I get

Name              Status       User  File
mongodb-community started      steve ~/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist
mysql             started      steve ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
nginx             error  256   root  ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist
php@8.1           error  19968 root  ~/Library/LaunchAgents/homebrew.mxcl.php@8.1.plist
redis             started      steve ~/Library/LaunchAgents/homebrew.mxcl.redis.plist

and in my php-fpm.log , I get this:

[23-Dec-2022 15:13:49] NOTICE: [pool valet] 'user' directive is ignored when FPM is not running as root
[23-Dec-2022 15:13:49] NOTICE: [pool valet] 'user' directive is ignored when FPM is not running as root
[23-Dec-2022 15:13:49] NOTICE: [pool valet] 'group' directive is ignored when FPM is not running as root
[23-Dec-2022 15:13:49] NOTICE: [pool valet] 'group' directive is ignored when FPM is not running as root
[23-Dec-2022 15:13:49] ERROR: Another FPM instance seems to already listen on /Users/steve/.config/valet/valet81.sock
[23-Dec-2022 15:13:49] ERROR: Another FPM instance seems to already listen on /Users/steve/.config/valet/valet81.sock

There is only one version of PHP installed, so I'm not sure what other process would be listening.

What am I missing?

Someone pointed that I had apparently competing php-fpm processes and that I should let Valet take care of installing what it needs, so I

  1. Uninstalled php@8.1 via homebrew
  2. installed 8.2 ( brew install php )
  3. Ran valet install , which installed nginx and dnsmasq

and now it runs fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM