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

ML's avatar
Level 2

Homestead 502 bad gateway for php 7.3 web app - works with 7.2

Hi all, I just finished installing Homestead on a brand new laptop. All working well to this point.

I git cloned my project (which I have been building on my desktop) and when I run up

Homestead up --provision

all completes OK other than I get:

502 bad gateway

when accessing my project. The project is built on the current release of Laravel, which I understand supports PHP 7.3. In my Homestead.yaml I point my project to PHP 7.3.

If I change the project to PHP 7.2 I can access the project via browser just fine.

Did I miss something?

In my Homestead.yaml, this works in the browser

- map: project.com.au
  to: /home/vagrant/src/project/public
  php: "7.2"

This returns 502:

- map: project.com.au
  to: /home/vagrant/src/project/public
  php: "7.3"

Thank you.

0 likes
4 replies
Cronix's avatar

I don't believe it's fully tested yet. If you look at the comments on their .travis.yml file in the framework repo, you'll see "Allow 7.3 failures". There is a fix waiting to be merged to change that. 7.3 was only officially released yesterday Dec 6. Are you sure the 7.3 version in homestead is the stable version officially released yesterday?

ML's avatar
Level 2

Hi Cronix, thanks for the reply and advice. I will go digging around.

jred_lewis's avatar

Just curious, did you ever resolve this? I'm having the same issue with Homestead when trying to use 7.3 on a project.

Edit: Never mind. Figured it out; just had to change the setting for which PHP cli that Homestead uses by default.

hasan.techie@gmail.com's avatar

@JSLEWIS90 - Will you please help me how to change that setting? i am also facing same issue 7.2 works fine but PHP 7.3 give 502 Gateway error :|

Please or to participate in this conversation.