Subdirectory multisite – only root admin available on NGINX

I’m not 100% sure how I fixed this, but I did.

A few things I did:

Make sure you clear your cookies, or test in an incognito window. Login cookies caused me some problems.

I replaced my nginx rewrites with:

rewrite ^/(site1/|site2/|site3/)?(wp-(content|admin|includes).*)$ /wp/$2 break;
rewrite ^/(?!wp/)(site1/|site2/|site3/)?(.*\.php)$ /wp/$2 break;

Because I’m dealing with a small network with clearly defined sites, I was able to include them directly in the regex. You may need to do something more broad; ymmv.

After restarting my server and clearing cookies, this seemed to do the trick!