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

maisnamraju's avatar

Homestead has too many redirects

I just set up homestead with virtualbox 5.0.28 and vagrant 1.8.6. Though laravel seems to be running fine, I am not able to access the machine, the errors logs don't come out with anything and on doing a curl request, the only thing that I could find was that it was redirecting too many times to the login

Server: nginx/1.11.5
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Cache-Control: no-cache
Location: http://homestead.app/login
Date: Tue, 22 Nov 2016 22:00:29 GMT

HTTP/1.1 302 Found
Server: nginx/1.11.5
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Cache-Control: no-cache
Location: http://homestead.app/login
Date: Tue, 22 Nov 2016 22:00:29 GMT

I had the same thing running earlier on earlier versions of vgrant though I am not sure which one it was now and seem to have broken it now.

0 likes
4 replies
ejdelmonico's avatar

Sometimes, the browser cache is the isssue with that error message, especially in Chrome. Clear your cache and history. Also you might want to run

artisan clear-compiled
artisan clear:cache
artisan clear:config
artisan route:clear
artisan view:clear

as well.

maisnamraju's avatar

Thanks, but that didn't work. I don't think it has to do with the browser as well as I did a curl request and the same redirection thing happened.

ejdelmonico's avatar

Ok, that is the most common issue that I have had. Could you state Windows or Mac? Post homestead.yaml. Maybe routes file as well.

maisnamraju's avatar

Thanks, but I found out the issue was with one of the middleware files.

Please or to participate in this conversation.