Bedrock + Local by Flywheel Error 502 error

After running through the steps here Local Bedrock Development with Local by Flywheel | Roots

I get this error:

Request Error

The page you requested generated a server error and could not be processed.
If you continue to get this message after refreshing, try restarting the Local site.

If the error persists, check the Local Router Logs in Local by going to
Help » Reveal Local Router’s Logs.

2022/08/26 12:01:21 [error] 49239#0: *4 connect() failed (111: Connection refused) while connecting to upstream, client:, server: matrixtheme.local, request: “GET /wp-admin/ HTTP/2.0”, upstream: “”, host: “matrixtheme.local”

Also in the last steps to set this up:

A few directories above our Bedrock install is a folder for configurations files called conf . We’re going to edit ~/Local Sites/bedrock/conf/nginx/site.conf and set the root to /app/bedrock/web/ :
This is different for me we have:

root “{{root}}”;

I changed this to the relative path:

root /home/ben/local-sites/matrixtheme/app/bedrock/web;

I am not 100% if this is correct.

Flywheel has no issues until I try to set up bedrock

@ben99 yeah that post is a bit outdated - Local isn’t using Docker anymore, so the root line is no longer /app/bedrock/web - and yeah unfortunately you have to set it up using the absolute path (which will obviously be differerent for everyone since it includes a username).

Not sure if this will help but see Adding Bedrock to Local version 5 - #13 by genyus - Support - Local Community

The suggestion is to add the rewrite rule, so your conf/nginx/site.conf.hbs includes it:

	# WordPress Rules
    {{#unless site.multiSite}}
    include includes/wordpress-single.conf;
    include includes/wordpress-multi.conf;

	rewrite ^/(wp-admin.*)$ $scheme://$http_host/wp/$1 permanent; # this is the line to add

I’ve got this working so it’s definitely possible… hopefully this tip helps… keep trying :slight_smile: