403 Forbidden nginx/1.16.0

Issue Summary

Whenever I pull any site from WP Engine, Local starts provisions for a second or two and then stops, as if complete, but open the site gives 403 Forbidden nginx/1.16.0. I tried on 3 different machines, used different versions, change the router host, restarted … nothing seems to help

Troubleshooting Questions

  • Does this happen for all sites in Local, or just one in particular? All sites

  • Are you able to create a new, plain WordPress site in Local and access it in a Browser? Yes, I did this, and it worked fine, creating the site in Local


Describe the steps that others can take to replicate this issue. If you have screenshots that can help clarify what is happening, please include them!
I connect Local to Wp Engine
Choose a site and Pull
Local showa “provisioning” only for a few seconds and then stops, showing the “Site Pulled!” success message
I Open Site, and get the error

System Details

  • Which version of Local is being used? 6.7.2+

  • What Operating System (OS) and OS version is being used?

    • For example: macOS Catalina or Windows 10 Professional
      tried on OS Montery with Apple Silcon chip; OS Mojave with Intel
      local-lightning.log (985.7 KB)
  • Attach the Local Log. See this Help Doc for instructions on how to do so:

Security Reminder

Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Hey @Jerry, Welcome to the Local Community Forums!

As it turns out, I was investigating an issue on Friday that looks and sounds somewhat like what you’re describing.

For reference, the 403 error is coming from Local’s Router. You can think of the Router as the main nginx process that ensures the domain, ie mysite.local, goes to the actual WordPress site.

The 403 part is basically nginx telling you that when it tried to fulfill the request it couldn’t, likely that’s due to files not actually being there. That makes sense, because when I look at the Local log, I’m seeing a number of lines that look like:

{"thread":"main","class":"DevKitService","message":"wpe_cli+rsync+pull+devairproducts@devairproducts.ssh.wpengine.net: Permission denied (publickey).\r\n","level":"warn","timestamp":"2023-06-05T14:14:23.695Z"}
{"thread":"main","class":"DevKitService","message":"rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]\n","level":"warn","timestamp":"2023-06-05T14:14:23.698Z"}
{"thread":"main","class":"DevKitService","message":"rsync error: unexplained error (code 255) at io.c(226) [Receiver=3.1.3]\n","level":"warn","timestamp":"2023-06-05T14:14:23.699Z"}
{"thread":"main","class":"DevKitService","message":"wpe_cli+db+pull+devairproducts@devairproducts.ssh.wpengine.net: Permission denied (publickey).\r\n","level":"warn","timestamp":"2023-06-05T14:14:24.648Z"}

Note the rsync: connection unexpectedly closed part of the above message – that basically means that when Local tried downloading the files using rsync, it wasn’t able to do so, which probably explains why there are no files for the Local Router to serve.

A couple of questions:

  • Do you have multiple user accounts with WPE?
  • Do you connect with any, or all of those accounts using the terminal and your own SSH key?
  • Do you have any configuration settings contained within the ~/.ssh/config file?

Hi, thanks
I do have multiple user accounts, but only one is used for dev on this machine;
Yes, I have SSH setup and configured; I did verify the key and they match … though, now that you mentioned that, I haven’t logged out of Local and tried to re-connect to WPEngine with the API key, maybe that would resync my setup … I’ll try when I get a chance and report back

well, that worked … I disconnected from WpEngine, logged, back in to Local, which asked for the API key and password, and then tried to pull a site. It worked. Tried several sites, all worked as expected

thanks for steering me in the right direction

1 Like

Nice, I’m glad you got it working! That means you didn’t encounter the bug I was running to. Under the hood, disconnecting and re-connecting to WPE basically has Local re-submit an SSH key to WPE.

We’re looking to improve the Connect to WPE experience so you won’t have to disconnect to re-submit a key, but until we ship those improvements, disconnecting and reconnecting is a good first step when troubleshooting Connect to WPE issues.


This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.