Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Running multiple forums off same installation

I would like to run several vanilla forums under different addresses. I think it would make my life a lot easier if I could use the same vanilla installation for all of them, so I would only have to keep one installation up to date and so on.

My plan to make this work is to create a /conf/bootstrap.before.php which sets several config settings depending on the domain that was used to access the forums.

From looking at that file it seems like it would be sufficient to set PATH_LOCAL_CONF, PATH_LOCAL_APPLICATIONS and so on, which would lead to all domains running the same core but writing custom data to different directories. I would then set up different databases and site names using a custom config.php in PATH_LOCAL_CONF.

Do you think this would work? Is there anything else I need to consider?

Comments

  • hgtonighthgtonight ∞ · New Moderator
    edited March 2013

    I am just riffing here, I would take the applications, js, library, locales, plugins, and themes folders and place it in a non-web facing folder. Then I would install Vanilla into each of the desired sub-directories. After deleting those folders, I would symlink them all to the non-web facing folder.

    This would leave you with separate cache, conf, and uploads folder for each install. This would let you use different dbs, themes, etc.

    Cool thought experiment, but not sure I would suggest it.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • I think that could work as well, but I suspect like the LOCAL paths might already be in place exactly for this purpose. Or are they used for something else?

    I assume the forum hosting that Vanilla offers might do something similar to what I would like to do too.

  • hgtonighthgtonight ∞ · New Moderator

    It would come down to testing. I am not sure what php defines as PATH_ROOT. Which would be needed to execute your /conf/bootstrap.before.php

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Well the idea would be that all my domains point to the same directory, so that they all load the same conf/bootstrap.before.php. In that file I would then look at the server environment to figure out what domain the request is coming from and set the corresponding _LOCAL_ paths.

    Is there documentation somewhere on what these paths exactly do? What directories can vanilla potentially write files to?

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    Each domain needs it's own installation. Local means local to that particular installation . You can't run several domains under the same installation . I can't think of the benefit of doing that other than wanting all forums looking the same but operating under different names ?

    I think it would make my life a lot easier if I could use the same vanilla installation for all of them,

    Yes, But In reality that would be a huge logistical nightmare to manage.

    which would lead to all domains running the same core but writing custom data to different directories.

    Installing the app into those other domains would work the same way, but without the headache.

    Do you think this would work? Is there anything else I need to consider?

    No I don't think that would work, first you need to understand the framework, do you? If you do then you would know the pitfalls of attempting such a feat.

    I assume the forum hosting that Vanilla offers might do something similar to what I would like to do too.

    Hosting offers you a place to put your files and execute apps. You can have subdomains under one root.

    example :

    Myroot main Domain =>subdirectory Forum,subdirectory WPBlog,subdirectory html etc

    Myroot SubDomain1=>subdirectory Forum,subdirectory WPBlog,subdirectory html etc

    Myroot SubDomain2=>subdirectory Forum,subdirectory WPBlog,subdirectory html etc

    You can't as far as I can understand :

    MyRoot Domain=>Forum<=SubDomains<=Subdomain

    I can't even wrap my mind around managing this if it were possible

  • x00x00 MVP
    edited March 2013

    The symlinnk idea is much more sound. After all, you are going to have to haves separate configs anyway. Otherwise you are going to have to create a multi-site facility, and what you want to do is predefine, which is going to be tedious.

    I would not symlink index.php but copy it along with conf, cache and upload, and have the server rules handle the routing.

    You can create a script for setting up each new forum, to automate this process.

    As you are symlinking most of the framework, then the footprint isn't going to be large.

    grep is your friend.

  • peregrineperegrine MVP
    edited March 2013

    another @error -huh! But very interesting conversation.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • You don't strictly have to copy index.php, but if you do as PATH_ROOT will be of that directory rather than the symlinked directory.

    You could say it it doesn't matter, but in logs, it is clearer, etc.

    grep is your friend.

Sign In or Register to comment.