Roots Discourse

Bedrock + Multisite (Subdirectory) + Nginx Issues


I’m currently trying to converting an existing Bedrock site into a Multisite using subdirectories on a server running Nginx, but am hitting some issues when accessing the backend.

For the sake of an example, let’s say the domains are.

Everything is working fine on the frontend, but when trying to access the dashboard for each site I’m either getting a 404 or getting stuck in a redirect loop.

mysite,com/uk/wp-admin - Gives me a redirect loop
mysite,com/uk/wp/wp-admin - Gives me a 404

I have tried the following snippet which I’ve seen posted a few times here.

\# Rewrite multisite '.../wp-.*' and '.../*.php'.
if (!-e $request_filename) {
    rewrite /wp-admin$ $scheme://$host$uri/ permanent;
    rewrite ^/[_0-9a-zA-Z-]+(/wp-.*) /wp$1 last;
    rewrite ^/[_0-9a-zA-Z-]+(/.*\.php)$ /wp$1 last;

I’ve also tried with both with and without ‘/wp’ at the end of the value for the siteurl in the database.

Feel like I’ve gone back and forth retrying the same fixes many times, but must be missing something obvious.

Can anyone help?

The config from the docs is slightly different, have you given that a shot yet?

This topic was automatically closed after 42 days. New replies are no longer allowed.