502 Bad Gateway -> herd72.sock failed (Solution) #400
tylerwiegand
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
tl;dr -- try
herd secure
andherd unsecure
I made a custom ViteValetDriver I wanted to try out for a local Vite site. It's just the Basic HTML one but i replaced /public with /dist to try to conform to the "new standard." Anyways, I wanted to get it working with Valet so I was at least somewhat assured that Laravel Forge would handle my project well.
I also noticed that I had some leftover Nginx configurations located in the
~/Library/Application Support/Herd/config/valet/Nginx
folder, which I promptly deleted, then rebooted, etc, all the usual stuff, but the 502 Bad Gateway error persisted regardless.At first I believed there was nothing in the Nginx Log because nothing showed in the Herd Menu -> Nginx Log magnifying glass button, but I found tailing
~/Library/Application Support/Herd/config/valet/Log/nginx-error.log
manually did (maybe this is expected? but not by me!)The error message was (twice every time):
herd72.sock? That's odd -- I'm set to php 8.1... at least I am on all the gizmo interface settings...
I checked around the Valet github repo and found several references to
valet72
in tests, so it was probably a "fall back" value or something...So I tried
herd use 8.1
No change! (and sorry, you're probably wondering if I got a herd72.sock error here, but I don't recall!)
Then I was reading the documentation for Valet and found that my nginx configuration file that I saw was a remnant of the
valet secure
command -- so I must have in the past secured the site, then rebooted or something? Anyways, I triedherd secure
, verified the Nginx config file populated, thenherd unsecure
, and like magic, now it works! No more Bad Gateway!So, hopefully that helps someone later. It was a real pain this morning.
Beta Was this translation helpful? Give feedback.
All reactions