WordPress.org

Forums

[resolved] Themes not found (5 posts)

  1. matteo4536
    Member
    Posted 1 year ago #

    Hello,

    I installed WordPress 3.7.1 on a Debian 8 and configured it for multisite with subdomains, but styles work only for main domain (domain.net) and not for subdomains (subd1.domain.net, etc.).

    if I go to "Manage themes" in the first case I see style thumbnails, in the secon one no (The requested URL /wp-content/themes/twentytwelve/screenshot.png was not found on this server..)

    I read several posts on this subject, but no one helped.

    Configuration files follow:

    [apache.conf]

    <VirtualHost *:80>
            ServerName              domain.net
            ServerAlias             domain.net *domain.net
    
            ErrorLog                /var/log/apache2/wp-error.log
            TransferLog             /var/log/apache2/wp-access.log
    
            UseCanonicalName        Off
            VirtualDocumentRoot     /usr/share/wordpress
            Options                 All
    
            <Directory /usr/share/wordpress>
                    AllowOverride           FileInfo Options All
            </Directory>
    
            # wp-content in /srv/www/wp-content/$0
            RewriteEngine           On
            RewriteRule             ^/wp-content/(.*)$ /srv/www/wp-content/%{HTTP_HOST}/$1
    </VirtualHost>

    [config-domain.net.php]

    define('DB_NAME', 'wordpress');
    define('DB_USER', 'wordpress');
    define('DB_PASSWORD', '********');
    define('DB_HOST', 'localhost');
    define('SECRET_KEY', '***...***');
    define('WP_CONTENT_DIR', '/srv/www/wp-content/domain.net');
    
    /* Multisite */
    define( 'WP_ALLOW_MULTISITE', true );
    
    /* Network setup */
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', true);
    define('DOMAIN_CURRENT_SITE', 'domain.net');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
    define('AUTH_KEY', '***...***');
    define('SECURE_AUTH_KEY', '***...***');
    define('LOGGED_IN_KEY', '***...***');
    define('NONCE_KEY', '***...***');
    define('AUTH_SALT', '***...***');
    define('SECURE_AUTH_SALT', '***...***');
    define('LOGGED_IN_SALT', '***...***');
    define('NONCE_SALT', '***...***');
    
    /* Install and update method */
    define('FS_METHOD', 'direct');

    [htaccess]

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    # real files dealt directly
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    # other go through index.php
    RewriteRule . index.php [L]
  2. Since your wp-content in /srv/www/wp-content/, you may need to change allowoverride for that too.

    BUT. Why are you changing WP content like THAT and not properly via a define in WordPress?

  3. matteo4536
    Member
    Posted 1 year ago #

    Do you mean like this:

    [apache.conf]

    <VirtualHost *:80>
            ServerName              domain.net
            ServerAlias             domain.net *domain.net
    
            ErrorLog                /var/log/apache2/wp-error.log
            TransferLog             /var/log/apache2/wp-access.log
    
            UseCanonicalName        Off
            VirtualDocumentRoot     /usr/share/wordpress
            Options                 All
    
            <Directory /usr/share/wordpress>
                    AllowOverride           FileInfo Options All
            </Directory>
    
            <Directory  /srv/www/wp-content>
                    AllowOverride           FileInfo Options All
            </Directory>
    
            # wp-content in /srv/www/wp-content/$0
            RewriteEngine           On
            RewriteRule             ^/wp-content/(.*)$ /srv/www/wp-content/%{HTTP_HOST}/$1
    </VirtualHost>

    I tried but it doesn't work.

    Please, tell me more about "changing WP content like THAT and not properly via a define in WordPress".

  4. matteo4536
    Member
    Posted 1 year ago #

    I commented the lines:

    # wp-content in /srv/www/wp-content/$0
            RewriteEngine           On
            RewriteRule             ^/wp-content/(.*)$ /srv/www/wp-content/%{HTTP_HOST}/$1

    in apache configuration and it works perfectly, now. Thank you very much!

  5. matteo4536
    Member
    Posted 1 year ago #

    I commented the lines:

    # wp-content in /srv/www/wp-content/$0
            RewriteEngine           On
            RewriteRule             ^/wp-content/(.*)$ /srv/www/wp-content/%{HTTP_HOST}/$1

    in apache configuration and it works perfectly, now. Thank you very much!

Topic Closed

This topic has been closed to new replies.

About this Topic