[resolved] local sub-domain multisite login problem ?????!! (8 posts)

  1. Nikos M.
    Posted 4 years ago #

    hi ,all
    i have a multisite install locally on xampp
    i have setup wordpress with wp-config.php (allow_multisite, multiaite, etc..), virtual hosts in apache

    NameVirtualHost *.domain.com
    <VirtualHost *:80>
    	ServerAdmin webmaster@localhost
    	DocumentRoot C:/domain
    	ServerName domain.com
    	ServerAlias *.domain.com
    	<Directory "C:/domain">
        Options Indexes FollowSymLinks Includes ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all

    setup hosts in win hosts file en.domain.com el.domain.com ar.domain.com

    created the sub domain sites through network admin
    and i can view all frontends
    the problem is that i can login only to primary site

    when i try to login to other sites
    although the login is succesfull (no error)
    it cannot redirect to admin section and redirects back to login page
    (cookies not set right) example:
    how can this be fixed??


  2. sebicas
    Posted 4 years ago #

    I have the same problem with a brand new 3.3.1 install... please help!

  3. xitmo
    Posted 4 years ago #

    I have also the same problem! waiting for help!

  4. Nikos M.
    Posted 4 years ago #

    Actually i solved the problem (it wasnt a real problem i think) you just have to have the main site of the multisite hav the root url

    my problem was that i wanted to have all sub-sites of multisite as sub-domains eg. en.domain.com, el.domain.com etc
    this is wrong (this is right but for wordpress is wrong) the main (first) sub site has to have the root url ie domain.com

    This was my problem, of course you also have to setup your vistual hosts correctly in XAMPP or Apache and define server alias in virtual host entry as

    ServerAlias domain.com *.domain.com

    Also you have to setup the hosts file (if local) on your local machine

    Hope this helps

  5. xitmo
    Posted 4 years ago #

    Thank you for your fast answer. In my case the root folder of my webpage is already in use, so I wanted blog.domain.com and blog2.domain.com etc., now i have seen that this setup is not supported by the native wordpress network!
    An interessting discussion on this subject is here:

  6. Nikos M.
    Posted 4 years ago #

    It is relatively easy to alter wordpress core to have this functionality
    i think it's not more than 3 lines of code
    but you would have changed the wordpress core with all consequences (no update etc..)

  7. xitmo
    Posted 4 years ago #

    That would be too much for me, I'm not an wordpress expert, just stubborn and overambitious, I will try next the domain mapping plugin!

  8. Nikos M.
    Posted 4 years ago #

    The domain mapping plugin is when you want to map the subdomains to different urls but still they have to be created in the first placce as wordpress wants them.
    im not sure but maybe it will work
    Try it and post back here your experience for everyone else to see.

Topic Closed

This topic has been closed to new replies.

About this Topic