Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

bionary's avatar

Valet Stuck in SSL

I had a local site running in secure mode (https) because I needed the app to access the camera I then ran > sudo valet unsecure mysite I restarted valet, restarted my computer, cleared laravel cached, cleared browser cache, the local site is still serving the https version.

Running > valet parked shows that the site in question is not using SSL.

I checked ~/.config/valet/Nginx to see if there was a leftover config there for the previously-secured site. Nope.

I'm quite confident that the problem is within Valet because running curl -I http://mysite.test shows a 302 redirect.

HTTP/1.1 302 Found
Server: nginx/1.27.2
Content-Type: text/html; charset=utf-8
Connection: keep-alive
X-Powered-By: PHP/8.3.13
Cache-Control: no-cache, private
Date: Tue, 21 Jan 2025 15:17:50 GMT

I've tried sudo laravel install, then repeating all aforementioned attempts to no avail.

I'm at a loss. Can anybody help? Thank you

0 likes
2 replies
hyouhoan's avatar

I will share with you want I'm going to do when this happen: first I will checking : .env file, nginx configuration, searching for the "https" word inside project. and then if I still can't find the cause I will copy source code to other folder to creating new local domain. so if it still happen that mean it is because of source code, if it is not it mean valet or nginx cache or configuration.

bionary's avatar

@hyouhoan The first thing I checked was the .env. As suggested I did a project search for "https", it's not anywhere that would affect the project. I like your copy over suggestion (although I haven't tried it yet) I'm fairly certain this is a server problem because I can see the 302 headers being served.D

How do I go about checking the nginx configuration? (I'm on macos).

Please or to participate in this conversation.