Skip to main content

How to debug 502 Bad Gateway errors?

Comments

3 comments

  • Chad Carlson

    Hi @avi-deitcher !

    With multi-app, I think this is going to depend on how you’re defining routes.yaml and web.locations. If I had to guess, you’re getting the following error because you’ve defined the route for that application like this:

    "https://{default}/metal/":
        type: upstream
        upstream: "app:http"
    

    And web.locations like this:

    web:
       locations:
           "/":
              root: "app_subdir/build"
    

    When defining a subdirectory route (https://{default}/metal/), you would also need to match that configuration in your web.locations block:

    web:
       locations:
           "/metal":
              root: "app_subdir/build"
    

    I may be off without looking at the code, and I agree there could be something more helpful here as far as error messaged go. Let me know if this helps.

    0
  • Avi Deitcher

    @chad-carlson yes! That did do it. Thank you, indeed.

    Yeah, it needs more in terms of:

    • docs that these need to be synced, perhaps especially in the two “how to make a static site” pages (one in the docs and one in how-to guides in the community pages)
    • how to debug error messages

    That leaves me much to figure out (one of the apps is painfully slow, maybe missing content, but that could equally be the static content itself, especially client-side JS dependencies).

    If I see it is delivering slowly, I should ask a new question?

    Thank you again @chad-carlson

    0
  • Chad Carlson

    Feel free to open another question or reach out to us on our Slack workspace as well (chat.platform.sh). Glad I could help! I’ll pass along your feedback to our documentation team.

    0

Please sign in to leave a comment.