The MU forums have moved to WordPress.org

Subdomains aren't created (20 posts)

  1. MaxG
    Member
    Posted 18 years ago #

    Installation seems to be fine - vhosts enabled, dns wildcards. Using the ITDamager .htaccess I can log in to the admin blog but only if I change

    #uploaded files
    RewriteRule ^([_0-9a-zA-Z-]*)/?files/(.*) /wp-inst/wp-content/blogs.php?file=$2 [L]

    to

    #uploaded files
    RewriteRule ^([_0-9a-zA-Z-]*)/?files/(.*) /wpmu/wp-inst/wp-content/blogs.php?file=$2 [L]

    and

    # subdirectory passthru
    RewriteRule !^subdir - [C]
    RewriteRule ^(.*) /wp-inst/$1 [L]

    to

    # subdirectory passthru
    RewriteRule !^subdir - [C]
    RewriteRule ^(.*) /wpmu/wp-inst/$1 [L]

    ...ie adding /wpmu to the path.

    I can then, apparently, create new blogs, either logged in as admin or not logged in. The blogs and users appear in the admin interface. I receive the activation email (not for the original set up of course!) for the new blog, but the link does not work:

    http://blogname.mysite.com/wp-activate.php?key=52e63981aedf2c57

    I just get a 404. I can navigate to

    http://mysite.com/wpmu/wp-activate.php?key=52e63981aedf2c57

    ...and then get the confirmation email. But the site blogname.mysite.com doesn't exist. Instead I get a Cpanel page with the message "There is no website configured at this address."

    Now I'm stuck, but I feel (hope?) it must be something simple.

    Where should the subdomains be hanging out? What goes into /blogs.dir/ (mine is empty)? Can anyone point me at an example of what the directory structure _should_ look like? Any hints, tips or clues gratefully received. We have an education site we'd like to use this on (currently it's on my personal space for testing).

  2. Gnagneur
    Member
    Posted 18 years ago #

    I got exactely the same problem.. Still searching an solution...

  3. tomppa
    Member
    Posted 18 years ago #

    Yep, same problem here.

  4. stutley
    Member
    Posted 18 years ago #

    I'm not an expert on this area, but it seems your problem is caused by the fact that you have installed WPMU in a subdirectory - not in the site root.

    Have you tried opening wp-config.php and edit this line:

    define('ABSPATH', dirname(__FILE__).'/');

    Try to change it to:

    define('ABSPATH', dirname(__FILE__).'/wpmu/');

    ...if your installation subdirectory is /wpmu of course :)

    I have no idea if it's going to work :)

    With regards to the blogs.dir directory, this is where WPMU will store all user-uploaded files.

  5. MaxG
    Member
    Posted 18 years ago #

    I'm not an expert on this area, but it seems your problem is caused by the fact that you have installed WPMU in a subdirectory - not in the site root.

    Not sure what you mean by this. The /wpmu/ sits under /public_html/. You can't install /wp-inst/ directly under /public_html/ because the install program complains if you try that. I'll try the wp-config.php fix later on (I'm just snatching a late lunch at the moment) and let you know how I get on.

  6. MaxG
    Member
    Posted 18 years ago #

    Good (in a sense) to know I'm not alone in having this problem, though. But better to know that people do have it working fine!

  7. MaxG
    Member
    Posted 18 years ago #

    Try to change it to:

    define('ABSPATH', dirname(__FILE__).'/wpmu/');

    ...if your installation subdirectory is /wpmu of course :)

    Oh well, that didn't work:

    Warning: main(/home/mydomain/public_html/wpmu/wp-inst/wpmu/wp-settings.php): failed to open stream: No such file or directory in /home/mydomain/public_html/wpmu/wp-inst/wp-config.php on line 88

    Fatal error: main(): Failed opening required '/home/mydomain/public_html/wpmu/wp-inst/wpmu/wp-settings.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mydomain/public_html/wpmu/wp-inst/wp-config.php on line 88

  8. samchng
    Member
    Posted 18 years ago #

    You have to install MU in the root which is public_html or else it would not work for the new build. It's stated in the install guide. Haven't tried subdirectory installation with new build due to lots of bugs that needs to be sorted out.

    For the older builds, I am using one from Feb or Mar, only then subdirectory (/wpmu/) like the one you used is possible. I have done it without problems. The install makes noise only if you don't chromd all the folders needed to be 777. Even public_html the root needs to be 777. So your URL to your blog would be domain.com/wpmu/

  9. MaxG
    Member
    Posted 18 years ago #

    I don't understand this. Ar you saying that the install should look like this: /public_html/wp-inst/ ? I tried that but the install program complains that it must be like this: /public_html/wpmu/wp-inst/ (which is exactly how it is). I can reach the page at mydomain.com/wpmu/, and I can login from there and get to the dashboard etc; I can even (seemingly) create new blogs. It's just that none of the blogs can be accessed.

  10. sesiri
    Member
    Posted 18 years ago #

    Im having the same problem here. Can anyone think of any solution? I was just wondering how http://host-press.com is doing it.

  11. samchng
    Member
    Posted 18 years ago #

    Yes, /public_html/wp-inst/. What build are you using?

  12. MaxG
    Member
    Posted 18 years ago #

    The build is 06-06-2006 (666! - maybe that's the problem... no, it was the same with 05-06-2006).

    I get the same issue installing with wp-inst in the web root - so subdomains aren't created. If I click on the link in the activation email I get a 404:

    Not Found
    The requested URL /wp-activate.php was not found on this server.

    I can activate the blog by going to mydomain.com/wp-activate.php, but subdomain.mydomain.com is 404'd. Of course I still can't actually see or admin the blog... ("There is no website configured at this address").

  13. MaxG
    Member
    Posted 18 years ago #

    Following up to myself. It does work using subdirectories, just not subdomains.

    I can create and admin blogs if I set it up to use subdirectories, and users can sign up. Pity about the subdomains, but at least it's working!

  14. sesiri
    Member
    Posted 18 years ago #

    Any idea on getting subdomains to work?

  15. itdamager
    Member
    Posted 18 years ago #

    MaxG, first I would verify the subdomains resolve properly in dns. Visit an online nslookup tool and type in your domain name. It should resolve to an ip address. Now try resolving domains such as foo.yourdomain.com or bar.yourdomain.com and they *should* resolve to the same ip as the main site. If they don't, the problem is the wildcard dns.

    Second, and only if the above works properly, I would suspect the apache config. Make sure virtual hosts are properly setup.

    Of course, you could always see how the grandmaster himself got wildcard dns and subdomains working.

  16. MaxG
    Member
    Posted 18 years ago #

    itdamager, thanks for that. main domain and subdomains do resolve to the same IP address. How can I make sure that virtual hosts are properly set up? I'm on a shared server, so I don't have direct access to Apache.

    Having thought further about the acutal way we'll be wanting to use this, subdirectories might be better anyway, but

    1) I'd like to get it working using subdomains for another project.

    2) I'd like to get the image/file display working in the blogs when using subdirectories. I guess this is something in the .htaccess, but right now I'm too tired!

  17. itdamager
    Member
    Posted 18 years ago #

    If there is a way for your host to setup virtual hosts for your domain in apache, I'm sure it would work, but that is going to depend on your hosting company. Some do, some may not. I've never used WPMU on a shared host, so I can't offer any advice.

  18. MaxG
    Member
    Posted 18 years ago #

    Well, they say virtual hosts are enabled. I may have another go, on a different site. I need to get this subdirectory version working properly too.

  19. samchng
    Member
    Posted 18 years ago #

    Good luck MaxG, any problems you can revert back here. Mu is pretty trial and error till you know more about it. ;)

  20. MaxG
    Member
    Posted 18 years ago #

    Cheers! For some of us that is more error than trial ;) but I'm pretty certain this is the solution we want.

    Meanwhile, the sun is shining and I must go and cut the grass...

About this Topic