• Resolved erikstainsby

    (@erikstainsby)


    We’re tearing our hair out here. We have multisite configuration working, subdirectory style. File uploads work to the subsites, but the primary (blog 1) site doesn’t see any upload traffic. We’re running on Ubuntu so have the Debian style configuration layout.

    /etc/wordpress/htaccess:

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # viewing attached files
    RewriteRule ^/wp-uploads/(.*)$ /srv/www/wp-uploads/%{HTTP_HOST}/$1 [L]
    
    # force HTTPS always
    RewriteCond %{HTTPS} off
    RewriteCond %{ENV:IS_HTTP} !1
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R,L=301]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [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-(content|admin|includes).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]

    /etc/wordpress/config-bclaconnect.ca.php:

    table_prefix  = 'wp_';
    $server = DB_HOST;
    $loginsql = DB_USER;
    $passsql = DB_PASSWORD;
    $base = DB_NAME;
    $upload_path = "/srv/www/wp-uploads/bclaconnect.ca";
    $upload_url_path = "https://bclaconnect.ca/wp-uploads";
    
    # Support for WP Networks functionality
    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', false );
    $base = '/';
    define( 'DOMAIN_CURRENT_SITE', 'bclaconnect.ca' );
    define( 'PATH_CURRENT_SITE', '/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );

    And finally, /etc/wordpress/wp-config.php:

    define('ABSPATH', '/usr/share/wordpress/');
    define('WP_ALLOW_MULTISITE', true);

    There is no trace of the uploads in log files anywhere on the system. What on earth is going on? Anyone?

    Frantic, in Vancouver,
    Erik

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Did uploads on the main site EVER work?

    Did you test anything on the site before Multisiteing?

    Thread Starter erikstainsby

    (@erikstainsby)

    Yes, Mika. Everything worked in initial installation. Also, I have a second server, development, which is working perfectly well. Uploads to primary and subdirectory sites working correctly.

    I have mirrored everything I can thinkof in the production server and still the images do not upload.

    Thread Starter erikstainsby

    (@erikstainsby)

    Dialed up the debugging noise for the apache logs to debug, and found this:

    [Sun Mar 30 10:07:35 2014] [debug] mod_deflate.c(615): [client 24.84.162.51] Zlib: Compressed 317 to 213 : URL /wp-admin/async-upload.php, referer: https://bclaconnect.ca/wp-admin/media-new.php
    [Sun Mar 30 10:07:35 2014] [error] [client 24.84.162.51] File does not exist: /srv/www/wp-uploads/bclaconnect.ca/2014/03/chicken-silhouette-64x64.png
    [Sun Mar 30 10:07:35 2014] [debug] mod_deflate.c(615): [client 24.84.162.51] Zlib: Compressed 325 to 249 : URL /wp-uploads/2014/03/chicken-silhouette-64x64.png

    So it looks like wp-admin/async-upload.php is munging the upload path which mod_deflate receives, possibly?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Unlikely or everyone would be crying ?? That’s a default file.

    Can you elaborate on what you mean by ‘vanish’? I’m assuming you mean you drag and drop and the file uploads, but when you refresh it’s gone?

    Thread Starter erikstainsby

    (@erikstainsby)

    What I meant was the files could not be found in the server’s filesystem after apparently being uploaded.

    In any case, the issue has been resolved. It was an overlooked setting in Network Admin > Sites > Settings . The File upload path here was incorrect and had been placing the files in the wrong place. EUD. [End-user deficiency]

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Primary site file uploads vanish, subdirectory subsites working fine’ is closed to new replies.