Multisite wp-admin redirecting to main wp-admin using NGINX

When I try to go to the wp-admin of any multi site, it redirects to the main wp-admin.

So if I go to example.com/multi-site-slug/wp-admin/ it redirects to example.com/wp-admin/

NGINX is being used as a reverse proxy.

I’m using the standard WordPress Multisite Subdirectory rules per the codex: https://wordpress.org/support/article/nginx/

If I take out this line in the conf file rewrite ^(/[^/]+)?(/wp-.*) $ 2 last;, it prevents the redirect but then media assets don’t serve properly on the multisites.

Can’t access wp-admin from my host

I’ve set up a VirtualBox Ubuntu VM with LAMP and installed WordPress on it. From inside the VM, I can reach all of the wordpress site from the browser without problem. But when entering the VM’s address in the host machine’s browser, I get only the html without the css styling, and when adding /wp-admin, I get the “Unable to connect Firefox can’t establish a connection to the server at localhost.” By the way, I’m using a bridged connection between the guest and host.

How to remove all redirects if I can’t access wp-admin?

So basically a few weeks ago I was using the redirect plugin to add some redirections, when I tried to be a bit fancier and redirect many things at once using the * pattern.

I don’t even know what exactly I entered, but I utterly broke my site (www.dataden.tech).

I can say it’s only the redirects that broke, because if your URL matches a specific pattern (see this link) it will work without throwing a 500.

However if it takes the form dataden.tech/* (e.g., wp-admin) then it will just end in a 500, presumably after time out.

My question would be, is there any way I can delete all redirects from cPanel, or somehow access wp-admin without using the URL? My website is hosted using name.com, in case that helps at all. The redirects were made using this redirect plugin, IIRC.

I am a developer, you could even say I know some web development, just completely out of my depth in WordPress.

Thanks for reading this far!

wp-admin redirects to subdirectory after moving installation to subdirectory

I have moved a wordpress installation to a subdirectory, from var/www/html to var/www/html/wp-blog mainly to make it future proof. I have followed the instructions in the codex. My server is configured as such

  1. I have a nginx reverse proxy which directs calls to blog.mysite.com to the port 8080.
  2. Apache listens on 8080
  3. I have modified the .htaccess from what is given in the codex and it is as follows

.htaccess

<IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP_HOST} ^blog.mysite.com$   RewriteCond %{REQUEST_URI} !^/wp-blog/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$   /wp-blog/$  1 RewriteCond %{HTTP_HOST} ^blog.mysite.com$   RewriteRule ^(/)?$   wp-blog/index.php [L]  </IfModule> 

I have only changed the ^(www.)? test to blog since I don’t want www. Also although the wordpress instance is in a subfolder I would like to server it via blog.mysite.com and the admin at blog.mysite.com/wp-admin.

Now my trouble is that when I use the the url blog.mysite.com/wp-admin it takes me a the login page but I get stuck in a loop after that. I noticed that my url in the address bar has a redirect_to set at blog.mysite.com/wp-blog/wp-admin. If I remove wp-blog from the redirect url, I am able to login.

The weird part is that, if the session gets over while I am in the admin page, the redirect url is fine!

At this point I have changed the WordPress URL in the General Settings to blog.mysite.com/wp-blog and everything works as far as I see. But as I said before I would like to use the admin panel on the root.