Multisite subdomains and 502 errors while changing subsite URL

Hi,
I’m trying to run this multisite subdomains install on Local :

  • create a new multisite WordPress, set to subdomains, and set the domain to : main.domain.local : OK
  • create a sub site : subsite.main.domain.local : OK
  • rename this sub site to subsite.domain.local (removing “main” domain part) in WordPress network admin : OK
  • update hosts file with this new domain :
    ::1 subsite.domain.local #Local Site
    192.168.95.100 subsite.domain.local #Local Site
    ::1 www.subsite.domain.local #Local Site
    192.168.95.100 www.subsite.domain.local #Local Site
  • visite subsite.domain.local : NOT OK, got a 502 error from server

I’ve tested this process with an other local web server (Lando), and it’s work fine, so I guess that’s not a problem with WordPress itself.
Maybe I should update something else in Local config ?
Any help appreciate.

My config :
Windows 8
Local 3.0.4

I’m having the same issue as well. I’m on Windows 10, Local 3.0.4. It looks like Flywheel updated my hosts file correctly, so I’m not sure what the issue is. Restarting the site didn’t help. It seems like it might be because a route is never generated for the different domain?

EDIT: That seems to have been the issue. Manually creating a new .conf file in the routes folder for the new domain works, although I only did that with the HTTP block - I’m not sure how to generate the proper SSL certificates for the HTTPS block. This obviously isn’t a solution, so any fix would be great.

Hi !
Thanks for that details.
What did you write exactly in the new .conf file ?
I’ve copied the main site .conf file (main.domain.local.conf), renamed it “subsite.domain.local”, and replaced all main domain occurences with the new subsite url, but got “ERR_NAME_NOT_RESOLVED” or 502 error when visiting subsite.domain.local