• The users in a sub-site (installed as a Subdirectory in a WP Multisite) can’t login.

    Login page seems to redirect to Wp-Admin page of main site (where they’re not supposed to have access) when using their credentials.

    I’d like to know where (folder and file) this redirect is set as well knowing if the WP Database have the subdomains’ Wp-admin and wp-login URLs created or I should set them in a config file.

    I’m really thankful for your help as I couldn’t find a solution in Google/StackOverflow and lost a lot of time locked out of the network after implementing SSL (solved now) and I have to deliver the website this week.

    Regards,
    Marco

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • I see an Nginx server. You’re trying to run a multisite on an Nginx server? Or is that just a Proxy box out front?

    Running a multisite on Nginx makes things a little more difficult because the htaccess directives need to be translated and placed into the server’s config file.

    Else, your links to the login modals need to be explicit. So wp-login needs to be wp-login.php instead… else the redirects won’t work properly.

    • This reply was modified 4 years, 2 months ago by JNashHawkins.
    Thread Starter convertiva

    (@marspro)

    Dear @jnashhawkins thank you so much for your hint!

    I think you’re right, it’s an Nginx server. I had hired to run a different App back in 2012 and them started installing WordPress and Multisite later on and haven’t paid attention to this limitation.

    Just checked the FTP and found Nginx folders but can’t access the config files.

    Also checked current htaccess file but it seems there’s no info on redirecing (That’s the file on the root of the folder after installing the Simple SSL Plugin to manage the upgrade from Http to https websites on the Multisite)

    The login and admin directives that you mentioned should be on this file?

    # BEGIN Really_Simple_SSL_UPGRADE_INSECURE_REQUESTS
    <IfModule mod_headers.c>
    Header always set Content-Security-Policy “upgrade-insecure-requests;”
    </IfModule>
    # END Really_Simple_SSL_UPGRADE_INSECURE_REQUESTS
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]

    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ – [L]
    RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    </IfModule>

    If you’ve been on that server for 8 years then I’d be wanting to get off of it unless it was perfect otherwise… or a cluster or cloud-based server.

    Good time to pick up that multisite and move it to an Apache-based Xnix box. You don’t want Windows either.

    If your webhost will help you though then you can move the htaccess directives to the Nginx config file.

    Some of the above is just based on my experiences though. But I’ve been at this game for years and find my own counsel best for me.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Users Can’t Login in Subsite’ is closed to new replies.