Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

one server - one database - mutilple domains

jrossjross New
edited November 2006 in Vanilla 1.0 Help
I am looking to share the database with several different domains - is this possible? Can I upload the script to the different domains and define the conf files the same - or will I have an issue with cookies?

Comments

  • Options
    Assuming each domain can connect to the database it'l be fine. You'd need to change the database prefix in each of the conf files though.
  • Options
    Cookies shouldn't be a problem because they're defined on a per-domain basis.
  • Options
    What about defining the Extensions folder to be the same in the settings tab - or sharing the theme files. It appears that I'm not able to define a full path to the themes folder. Also it seems like the extensions went a little wacky. Perhaps I just need to manually change the content of those diretories when I make an update. Here are some of the parameters of the setting file from the new domain (domainB) - same server. // Application Settings $Configuration['SETUP_TEST'] = '1'; $Configuration['APPLICATION_PATH'] = '/home/sites/www.domainA.com/web/vc/'; $Configuration['DATABASE_PATH'] = '/home/sites/www.domainA.com/web/vc/conf/database.php'; $Configuration['LIBRARY_PATH'] = '/home/sites/www.domainA.com/web/vc/library/'; $Configuration['EXTENSIONS_PATH'] = '/home/sites/www.domainA.com/web/vc/extensions/'; $Configuration['LANGUAGES_PATH'] = '/home/sites/www.domainA.com/web/vc/languages/'; $Configuration['THEME_PATH'] = '/vc/themes/vanilla3/'; $Configuration['DEFAULT_STYLE'] = '/vc/themes/vanilla3/styles/default/'; $Configuration['WEB_ROOT'] = '/vc/'; $Configuration['BASE_URL'] = 'http://www.domainB.com/vc/'; $Configuration['FORWARD_VALIDATED_USER_URL'] = 'http://www.domainB.com/vc/'; $Configuration['SUPPORT_EMAIL'] = 'jamie@domainB.com'; $Configuration['SUPPORT_NAME'] = 'Jross'; $Configuration['APPLICATION_TITLE'] = 'jross Forum'; $Configuration['BANNER_TITLE'] = 'jross Forum'; $Configuration['COOKIE_DOMAIN'] = '.domainB.com'; $Configuration['COOKIE_PATH'] = '/'; $Configuration['SETUP_COMPLETE'] = '1'; $Configuration['ENABLE_WHISPERS'] = '1'; $Configuration['DISCUSSION_TIME_THRESHOLD'] = '40'; $Configuration['DISCUSSION_THRESHOLD_PUNISHMENT'] = '300'; $Configuration['LAST_UPDATE'] = '1158168682'; $Configuration['ATTACHMENTS_UPLOAD_PATH'] = '/home/sites/www.domainA.com/web/vc/uploads/%year%/%month%/';
  • Options
    I didnt realise you couldnt define a full path to the themes folder. As an alternative you could define the path as '../../www.domainA.com/web/vc/themes/vanilla3' which i think should work?
    When you say they went a bit wacky, what happened?
  • Options
    edited October 2006
    I just tried this & changing the themes on one domain changes it on both domains, and unless the subfolders line up /vanilla/themes vs. /forum/themes one site's themes won't work. Edit: Oops, just read the previous post more closely. I just created a fake themes folder with nothing but the stylesheets & images.
  • Options
    All the tabs across the top also point to the original domain. Clicking on "Discussions" takes me back to the old domain.
  • Options
    I seem to have straightened the themes out, but the links across the top still need fixing.
  • Options
    edited October 2006
    I'm pretty sure those tabs are built from the paths you give vanilla which then go into the conf/settings.php file - you sure they're all set up right?

    If it's any help, if I can be bothered tomorrow (which unfortunately is quite unlikely cause I'm pretty lazy) I might try setting up a few versions of vanilla running on a centralised store and write a short how-to for it. I'll see where the day takes me and if I find anything to do in the evening. If I get bored and finish fixing all the nightmare boxes at work I'll try and get onto it.
  • Options
    It might be the Page Management addon that doesn't quite properly uninstall itself when you disable it that hard-links the URLs.
  • Options
    Deleting the Page Management addon fixed the problem.
  • Options
    Meybe this way is work, I don't try this.

    <?php
    // settings.php

    $website = basename($_SERVER['HTTP_HOST']);

    $site1 = 'www.site1.com';
    $site2 = 'www.site2.com';

    if ($website = $site1){
    include('settings1.php');
    }
    else if ($website = $site2){
    include('settings2.php');
    }
    ?>
  • Options
    Same problem with me: Deactivating, deleting and reinstalling the Page Management extension helped. Thanks to Mark W to pointing that out!
This discussion has been closed.