• Resolved Lisa Linn Allen

    (@spacegrrl)


    We are on a corporate intranet, behind a firewall, so we cannot post a link to our site.

    We have several multisite installs running with WordPress in its own folder, these all have no problems.

    We are now trying to set up a multi-network install using the WP Multi Network plugin. We are on WordPress 4.1.1.

    One network is here:

    sww.sas.com/mysww

    (and this network is running fine)

    and one here:

    myswwstage.sas.com/mysww

    this is the one where we have a problem – the root blog displays the WordPress 404.php as its top page, and the admin pages for that network and the root blog are unusable because they do not get any CSS or jQuery.

    there is a second site in the problem network and it is fine! (eg, myswwstage.sas.com/mysww/t2)

    In our Apache error logs, for each request of myswwstage.sas.com/mysww/ we see three error lines like this:

    File does not exist: /dept/iss/wp-includes, referer: https://myswwstage.sas.com/mysww/

    /dept/iss/ is the document root of myswwstage.sas.com. the correct path to the wp-includes directory is:

    /dept/iss/mysww_prod/wp/wp-includes/

    At the same time, in the Apache access log, there is a 404 error for that page:

    "GET /mysww/ HTTP/1.1" 404

    as well as for the assets in /wp/ that it’s trying to get:

    "GET /wp-includes/js/jquery/jquery.js?ver=1.11.1 HTTP/1.1" 404
    "GET /wp-includes/js/jquery/jquery-migrate.min.js?ver=1.2.1 HTTP/1.1" 404

    however, it has no problem finding the assets in theme, which are in a custom content directory, here is one example from the access logs:

    "GET /mysww/content/themes/twentyfifteen/style.css?ver=4.1.1 HTTP/1.1" 304

    So in essence, for this one blog and the admin pages for the network and the root blog – WordPress does not know how to find… itself. It seems to lose the value of the ABSPATH constant.

    We are at a loss as to how to debug this, and are about to give up on Multi-Network altogether and just run two separate multisites.

    More wp-config.php details in case they are helpful:

    // ===================================================
    // Multisite enablement
    // ===================================================
    
    define( 'WP_ALLOW_MULTISITE', true );
    
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    # define('DOMAIN_CURRENT_SITE', 'sww.sas.com'); As per WP-MULTI-NETWORK plugin
    define('PATH_CURRENT_SITE', '/mysww/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
    
    // ========================
    // Custom Content Directory
    // ========================
    define( 'WP_CONTENT_DIR', dirname( __FILE__ ) . '/content' );
    define( 'WP_CONTENT_URL', 'https://' . $_SERVER['HTTP_HOST'] . '/mysww/content' );
    
    // ===================
    // Bootstrap WordPress
    // ===================
    if ( !defined( 'ABSPATH' ) )
    	define( 'ABSPATH', dirname( __FILE__ ) . '/wp/' );
    require_once( ABSPATH . 'wp-settings.php' );

    More Apache details in case they are helpful:

    .htaccess:

    RewriteEngine On
    RewriteBase /mysww/
    
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(admin|includes).*) wp/$2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ wp/$2 [L]
    
    RewriteRule . index.php [L]
Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    the admin pages for that network and the root blog are unusable because they do not get any CSS or jQuery.

    and

    In our Apache error logs, for each request of myswwstage.sas.com/mysww/ we see three error lines like this:

    File does not exist: /dept/iss/wp-includes, referer: https://myswwstage.sas.com/mysww/

    That makes me think that you didn’t set up the vhost entry properly for the second domain. When you did it, can you verify that you added AllowOverride All to it?

    Thread Starter Lisa Linn Allen

    (@spacegrrl)

    we don’t have that at the vhost but we do have that for the mysww alias:

    Alias /mysww /dept/iss/mysww_prod
       <Directory /dept/iss/mysww_prod>
         Allow from all
         AllowOverride all
       </Directory>
    Thread Starter Lisa Linn Allen

    (@spacegrrl)

    to clarify, that is within the configuration for the vhost.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Try

    AllowOverride options all
    Thread Starter Lisa Linn Allen

    (@spacegrrl)

    will do, thank you so much for looking at this. will report back tomorrow.

    Thread Starter Lisa Linn Allen

    (@spacegrrl)

    I believe that turned off .htaccess – from the error logs:

    /dept/iss/mysww_prod/.htaccess: RewriteEngine not allowed here

    and in the browser, Internal Server Error for every URL I tried on the myswwstage.sas.com network.

    I think we may just give up on multi-network and have two networks, but if you have any further ideas, I think we have a little time before we have to decide for sure.

    Again – thank you.

    Thread Starter Lisa Linn Allen

    (@spacegrrl)

    we decided today to give up on multi-network and go with two separate networks. not just because of this, but obviously not being able to get it to work helped our decision along ??

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    /dept/iss/mysww_prod/.htaccess: RewriteEngine not allowed here

    Yeah, so THAT is the problem entirely. Sorry ?? No rewrite, no multisite. It’s a requirement.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘404 on root blog of second multisite network in a multi-network install’ is closed to new replies.