WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Can't login after network subdomain install with 3.1 (5 posts)

  1. bigdavejonnyt
    Member
    Posted 3 years ago #

    Hi, I'm running WP 3.1 on Ubuntu 10.10, running apache 2.2 and php 5.3.3. I'm using dnsmasq for my local dns and I was hoping but [slowly losing that hope] to build a subdomain network install of wordpress.

    Logging in after making the alterations below fails/loops me back round to the login screen

    I've spent 4 days researching and trying to get the thing working so this is really the last port of call for me. I'm hoping I've just missed one small thing!

    My dnsmasq.conf has these two sections in it.
    address=/.davidt/127.0.0.1
    for handling wildcarded subdomains, and
    listen-address=127.0.0.1
    I'm on a local development machine, and this seems to be working ok. WP stopped throwing its 'tried to access random subdomain' error once this was in and running, and in conjunction with some virtual host config, is serving virtual hosts from the one IP and DNS cacheing as a bonus ; }.

    The relevant bit of apache onfig look like this
    ServerAlias *.davidt
    and apache is starting without error and apachectl -S shows the other virtual domains loading happily and the syntax for this part of the config error free.
    Syntax OK
    and

    david@david-ThinkPad-Z61t:/var/www/dyson$ sudo /etc/init.d/apache2 restart
    * Restarting web server apache2
    ... waiting .
    [ OK ]

    Copied the WordPress generated code into the right places thus - wp-config.php

    define('WP_ALLOW_MULTISITE', true); ¬                                      
    
    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', true );
    $base = '/';
    define( 'DOMAIN_CURRENT_SITE', 'davidt' );
    define( 'PATH_CURRENT_SITE', '/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );|~                                                                            
    
    /* That's all, stop editing! Happy blogging. */

    and built an .htaccess file - none there at the start - using the generated code thus...

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L]

    Site runs but admin doesn't, and commenting out of the new code in wp-config.php returns to be a single instance install of wp's admin console.

    Any ideas would be most gratefully received - I've tried everything I could find to date.

    Rgds, and in the hope I can help you out one day soon...

    bdjt

  2. define( 'DOMAIN_CURRENT_SITE', 'davidt' );

    Multisite complain when your domain does not have an extension. fake one.

    davidt.loc is fine.

  3. bigdavejonnyt
    Member
    Posted 3 years ago #

    Andrea,

    Thanks for getting back so smartly.

    Tried your suggestion, wasn't clear if you just wanted me to alter wp_config.php, or change all the other components as well, dnsmasq.conf and sites/enabled/000-default, so tried all permutations with those files and....

    no dice.

    Still looping back round to the login screen. I'll have a quick go at building a [less than ideal for my purposes] sub-directory install, and then I think I'll have to try something else, it's ok to type the 'Drupal' word round here isn't it? ; }.

    I wanted WP for the admin i/f which is better understood by the folks I'm doing this for.

    Rgds

    bdjt

  4. Tim Moore
    Moderator
    Posted 3 years ago #

    You need to update wp-config.php and also a couple of database tables (wp_blogs and wp_site).

  5. bigdavejonnyt
    Member
    Posted 3 years ago #

    Tim, Andrea,

    Thanks, between your advice and some judicious trial and erroring, I got there...

    Rgds

    David

Topic Closed

This topic has been closed to new replies.

About this Topic