• Resolved WOoOinux

    (@woooinux)


    Hello world !

    I read topics and topics since yesterday and I don’t find the solution to my problem…

    I trying to migrate a multisite wordpress from localhost to my server. All works perfectly on localhost but on my server I can access to the site and administrate all sites but when I want to access the second site I have a beautifull 404 error from apache. I’ve installed multisite into subfolder mode.

    Here is my .htaccess :

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    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-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]
    </IfModule>

    And here is my wp-config.php :

    /* Multisite */
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    $base = '/';
    define('DOMAIN_CURRENT_SITE', 'sub.domain.com');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);

    And my virtualhost :

    <VirtualHost *:80>
            ServerAdmin webmaster@localhost
            ServerName sub.domain.com
    
            SuexecUserGroup my_user my_user
    
            DocumentRoot /home/my_user/public_html
            <Directory />
                    Options FollowSymLinks
                    AllowOverride All
            </Directory>
            <Directory /home/my_user/public_html/>
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride All
                    Order allow,deny
                    allow from all
            </Directory>
    
            ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
            <Directory "/usr/lib/cgi-bin">
                    AllowOverride All
                    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                    Order allow,deny
                    Allow from all
            </Directory>
    
            ErrorLog /error.log
    
            # Possible values include: debug, info, notice, warn, error, crit,
            # alert, emerg.
            LogLevel warn
    
            CustomLog /access.log combined
    </VirtualHost>

    My server is under Apache/2.2.22 (Debian), PHP 5.4.35.

    I think I missed a configuration somewhere on the server or missed something on my .htaccess but I d’ont found what…

    Any ideas ?

    Thanks for your help 😉

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

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    when I want to access the second site I have a beautifull 404 error from apache

    Change AllowOverride All to AllowOverride Options All

    The issue is that your server can’t read the .htaccess

    Thread Starter WOoOinux

    (@woooinux)

    Thanks for your answer Ipstenu.

    I modified the virtualhost and reload apache but it still doesn’t work. I think my htaccess is readen because I have several wordpress with postname url on this server and it works perfectly. Mode rewrite is enabled.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    There’s working and then there’s working 🙂 The fancier rules in the .htaccess for Multisite often stump servers.

    <Directory /home/my_user/public_html/>
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride Options All
                    Order allow,deny
                    allow from all
            </Directory>

    That’s the one that needs the love.

    but when I want to access the second site I have a beautifull 404 error from apache

    Does it look like WordPress or is it a generic Apache error?

    Thread Starter WOoOinux

    (@woooinux)

    Sorry for ma lately answer…

    <Directory /home/my_user/public_html/>
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride Options All
                    Order allow,deny
                    allow from all
            </Directory>

    That’s the one that needs the love.

    I’ve edited like you’ve suggested but it still does’nt work…

    Does it look like WordPress or is it a generic Apache error?

    It is the WordPress 404 page which is display.

    I finally workaround the problem by installing WordPress in multi-domain multi-site mode and no problem anymore. It works great.

    I hope the Ipstenu’s answers will help someone who encounter the problem too and view this topic.

    Thanks a lot for your help.

    Best regards,
    WOoO

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘404 error on multisite’ is closed to new replies.