The MU forums have moved to WordPress.org

How to make a install like this... (14 posts)

  1. Gatoelho
    Member
    Posted 17 years ago #

    I want to configure it to work in subdomain, but the index page of it will be in a subfolder, like:

    http://www.mydomain.ext/ -> MainSite
    http://www.mydomain.ext/blogs/ -> Blogs Main Site
    blog_username.mydomain.ext -> blog address

  2. boetter
    Member
    Posted 17 years ago #

    That's no problem, there really isn't much of an index site in MU. All you need to do is either link or include the wp-signup.php file so that people can sign up for a new blog.

    You can just change the main blog's url under settings. Doesn't that work for you? :-)

  3. Gatoelho
    Member
    Posted 17 years ago #

    actually I didn't tried yet... but if works, wordpress will soon be one of the official tools to my company ^_^
    Thanks for the sugestion!

  4. boetter
    Member
    Posted 17 years ago #

    Good to hear. Let us know if it doesn't work for you. I couldn't see why it shouldn't though.

  5. andrea_r
    Moderator
    Posted 17 years ago #

    it should do it easily, as long as it's set up right.

  6. br41n
    Member
    Posted 17 years ago #

    ok, i really tried to RTFM and test all the things some people suggested around here but i just couldn't make it and i feel ashamed (cause it's my job to do this kind of stuff).

    So, im trying to do the same thing as the OP because i have http://www.mydomain.tld and mydomain.tld pointing to a business site and i want to make blogs for employees using name.mydomain.tld.
    First tried to make blogs.mydomain.tld but i realized that the users will have username.blogs.mydomain.tld so i read stuff on forums and came to this thread and tested to install it from mydomain.tld/blogs but now when i try to make a blog i get addresses like username.mydomain.tld/blogs which ofc doesn't work cause it can't find the dir (apache vhosts set like *.mydomain.tld pointing to /var/www/html/htdocs/mydomain.tld/blogs) and i don't want it to, i just want to make it work like user1.mydomain.tld but when i try to access that i get "Forbidden" error.

    That being said, im waitting for any helpfull hints on how to solve this (minor) issue... also i'd like to note that i have access to everything on the server including dns and stuff (which is setup right anyway with *.mydomain.tld pointing to the webserver's ip).

  7. br41n
    Member
    Posted 17 years ago #

    bump? anyone? please? :|

  8. lunabyte
    Member
    Posted 17 years ago #

    un-bump...

    Search Page

    Covered more times than bread has been with butter.

    Had you searched to any detail, you'd have found posts mentioning that if you install it in a subdirectory, that's what you get. <domain>/subdirectory/...

    If you don't want it in a subdirectory, then it has to be installed in the root of the domain.

    Also, forbidden errors lead to one of two things. Bad permissions, or the use of diretory protection with htaccess. If it's the latter, you have to declare a 401 and 403 page in htaccess.

  9. br41n
    Member
    Posted 17 years ago #

    i know how to use search, thank you... but as i said i've read alot of stuff that didn't helped hence my post which i (just) suppose you didn't read it fully.
    i cannot install in the root of the domain because there's already a website there so i asked for a solution to have both the website on domain.tld and http://www.domain.tld and the blogs like username.domain.tld

  10. lunabyte
    Member
    Posted 17 years ago #

    Which had you been more thorough, thank you, you would find it doesn't work that way.

    If it's in a subdirectory, it's going to be at the end of the url whether you use a subdomain install or not.

    Mod rewrite won't work, becuase it's in an existing directory, located off the root.

    Is it possible? Yes. Will you have to have in-depth knowledge of php and apache? Definitely.

    Will you have to merge your existing root site, and MU, in the root directory? Yep.

  11. joksanen
    Member
    Posted 17 years ago #

    "Will you have to merge your existing root site, and MU, in the root directory? Yep."
    This is one solid piece of information which should be faqised. Thanks, lunabyte.

    But, will it work if installed into a subdomain and separate blogs into different subdomains?
    Such as wpmu.domain.tld and then blog1.domain.tld, blog2.domain.tld and so on..

  12. lunabyte
    Member
    Posted 17 years ago #

    Sure, why not J.

    You can set the "root" path for a sub-domain to start at something like /home/username/public_html/subdomain-root, which would make subdomain.domain.com be served from there.

    Then, you'll have to do some hacking to wp-signup.php, wpmu-functions.php, wp-settings.php (for setting cookies), and the wp_sites table.

    It's a big undertaking, with lots of tiny edits in quite a few places.

    In wp-signup.php, it pulls the site_id for the primary domain, which in this case it thinks is your primary subdomain, so you have to tell it to grab the other domain instead, which would be id #2 on a clean install if you added it to the sites table properly.

    Then, you have to map and pass that id through the sign-up process functions for a blog or username, etc.

    With the cookies, it's going to try and set the cookie on .subdomain.domain.com, which will work for the primary, but not subdomains.

    On the site I set-up like this, I used stristr a lot to check for the primary subdomain (I.E. the main site) and strip/modify as necessary.

    Best thing you can do is keep a log of what files you touch, and what/where you touched them. Personally, if I edit a core file I always add in comments so I can find the edits in a file quickly.

    They look something like:

    function blah ($v1, $v2) {
    // Luke
    // Add description for edit (the what/why)
    the edited/modified code
    // /me
    continue the original code...
    }

    Then I keep a text file in the root directory on my local copy of the site, which I document all my changes in. Not saying anyone could decipher it (I'm horrible at notes that make sense to anyone but me, lol), but at least when new files come out it isn't too bad to know if I need to look at and compare files to merge my edits with new files.

  13. strixy
    Member
    Posted 17 years ago #

    "Which had you been more thorough, thank you, you would find it doesn't work that way."

    -Lunabyte

    "It's a big undertaking, with lots of tiny edits in quite a few places."

    -Lunabyte

    Check it

    http://blogizen.net/blogizen/strixy/
    vs.
    http://strixy.blogizen.net
    vs.
    http://strixy.com

    That was maybe two lines of "code". No rewrite required.

    I've been working up the above proof of concept for some time now. I thought I would lurk a little before I leaped into the fray, but the comments above were bait I just couldn't pass on. Maybe I should point out that blogizen.net resides on a server that I have "root" access to.

    I haven't finished the whole write up yet. Give me time. (Like another couple of months!) It's not easy to do all that so the write up will take some time.

    ... but it is possible...

  14. lunabyte
    Member
    Posted 17 years ago #

    But the question is, does everything work.
    Registration, files, and the whole enchilada.

    Also, how will this affect the main site at domain.tld, which isn't run by MU.

    If you found a better way to run a main site as a subdomain, and keep the users on the same level subdomain, cool.

About this Topic

  • Started 17 years ago by Gatoelho
  • Latest reply from lunabyte