Possible to reverse proxy WP multisite to a separate server with NGINX?

by user3183717   Last Updated June 30, 2020 02:08 AM

Recently migrated a multisite network, only to discover some of the sites are using a theme that's incompatible with the server's PHP version.

While I work on a longterm fix, what I'd like to is use NGINX to reverse proxy the non-working sites to the old server, while keeping the current, working sites pointed to the new server.

When I try the following, I'm able to make it to my old site's pages, but static assets (js, css, etc.) return 404, and I'm unable to access any /wp-admin pages. What should I change?

location /oldsite {
            proxy_pass http://my.old.ip;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
Tags : multisite nginx

Related Questions

wordpress.mydomian.com 404 Error

Updated August 21, 2018 14:08 PM