Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2013
    Posts
    70

    Branding - Running 2 WHMCS installations

    Maybe I'm just crazy talking here... But I need some advice.

    For branding purposes in my local market I picked up a second domain and was going to use it to run a second reseller operation as well as the domain for my WHMCS installation to handle the billing and account creation issues. In essence I was considering running two completely different WHMCS installs for two completely differently branded entities.

    I know WHMCS will allow for server groupings - but it doesn't seem to have the capability to operate two different company names. I wouldn't be considering this - but I've put a lot of work into the one company and I don't want to change names or the brand.

    I'd like to run the other "company" separately - hence another WHMCS install...

    Is this madness or not? Am I digging myself in and setting up for problems in the future?

    One part says - just stick with your one brand and focus on that. The other half says leave it the way it is and develop another brand geared more toward your local market.

    In the end, it's all about sales opportunities - and I'd like my local sales leads to be able to identify with a cohesive message separate from the one I've already developed which is more of a national rather than local thing.

  2. #2
    Join Date
    Apr 2008
    Location
    127.0.0.1
    Posts
    451
    I Think This Might work for You :

    - Create a user on the server “whmcs”
    - - This user should be pointed to /home/whmcs

    # adduser -d /home/whmcs whmcs


    - Extract the WHMCS script into /home/whmcs/master
    - - This will be the single install of WHMCS and it’s root web directory - Create symbolic links
    - - This is used for DOCUMENT_ROOT reference

    # ln -s /home/whmcs/master domain1.com
    # ln -s /home/whmcs/master domain2.com


    - Edit /home/whmcs/master/configuration.php to the following
    - - We are creating logic to include a different configuration file depending on which domain is being visited.

    if ($_SERVER["DOCUMENT_ROOT"] == '/home/whmcs/domain1.com') {
    include('configuration_domain1.com.php');
    }
    if ($_SERVER["DOCUMENT_ROOT"] == '/home/whmcs/domain2.com') {
    include('configuration_domain2.com.php');
    }


    - Create and edit your new configuration files
    - - Edit the settings as necessary, but make sure to use domain1.com and domain2.com where specified

    /home/whmcs/configuration_domain1.com.php

    $license="";
    $db_host = "";
    $db_username = "";
    $db_password = "";
    $db_name = "whmcs_domain1";
    $cc_encryption_hash = "";
    $templates_compiledir = "/home/whmcs/domain1.com/templates_domain1_c";
    $api_access_key = "";
    session_name("WHMCS_DOMAIN1");
    $display_errors = true;

    /home/whmcs/configuration_domain2.com.php

    $license="";
    $db_host = "";
    $db_username = "";
    $db_password = "";
    $db_name = "whmcs_domain2";
    $cc_encryption_hash = "";
    $templates_compiledir = "/home/whmcs/domain2.com/templates_domain2_c";
    $api_access_key = "";
    session_name("WHMCS_DOMAIN2");
    $display_errors = true;


    - Create template caching dirs for the domains, then chmod 777
    - - Due to the WHMCS’s devs wisdom, they require the directory to be 777.

    # mkdir /home/whmcs/master/templates_domain1_c
    # mkdir /home/whmcs/master/templates_domain2_c
    # chmod 777 /home/whmcs/master/templates_domain1_c
    # chmod 777 /home/whmcs/master/templates_domain2_c


    Now your configuration and directory structure is completed. WHMCS is now ready for both domains to work from one installation.

    The easiest part of this is setting up the web server. You can use anything, Nginx, Apache, etc. All you do is setup the document root to the symbolic links you created.

    Your directory structure should look something like this.

    # ll /home/whmcs
    drwxr-xr-x 21 whmcs whmcs 4096 Jan 21 13:49 master
    lrwxrwxrwx 1 root root 7 Dec 11 11:41 domain1 -> master/
    lrwxrwxrwx 1 root root 7 Dec 11 11:41 domain2 -> master/


    Just to give you an idea, this is what an Nginx configuration could look like.

    server {
    listen 123.456.789.1:443;
    server_name domain1.com;
    root /home/whmcs/domain1.com;
    access_log /var/log/nginx/domain1.com-access.log;
    error_log /var/log/nginx/domain1.com-error.log;
    ...more stuff below...
    }
    server {
    listen 123.456.789.2:443;
    server_name domain2.com;
    root /home/whmcs/domain2.com;
    access_log /var/log/nginx/domain2.com-access.log;
    error_log /var/log/nginx/domain2.com-error.log;
    ...more stuff below...
    }


    Now when you visit domain1.com or domain2.com they will be accessing the same WHMCS installation. You can change the themes and templates as needed through the admin interface.

    For cron job setup, make sure to use WGET with the full domain name so that each configuration is populated correctly.
    Cron example:

    0 8 * * * /usr/bin/wget -O /dev/null https://domain1.com/admin/cron.php >/dev/null 2>&1
    0 9 * * * /usr/bin/wget -O /dev/null https://domain2.com/admin/cron.php >/dev/null 2>&1


    This setup works flawlessly. We’ve had zero problems and have gone through two WHMCS updates already.

    Enjoy!
    Source : http://frustratedtech.com/post/74747...ltiple-domains
    XiNiX InfoTech Pvt. Ltd. ( Since 2005 ) : Quality Hosting @ Your Price !
    [ US/NL/IN ] Shared Hosting ♦ WHM Reseller ♦ VPS ♦ Dedicated Servers
    █ Included WHMCS ♦ SSL ♦ Domains ♦ IPMI ♦ SolusVM Visit Us Now

  3. #3
    Join Date
    Dec 2013
    Posts
    70
    That's hot.. Appreciate it.. I'll have to give it a look.

  4. #4
    Join Date
    Apr 2008
    Location
    127.0.0.1
    Posts
    451
    Quote Originally Posted by studioq View Post
    That's hot.. Appreciate it.. I'll have to give it a look.
    Thanx.
    Im Gonna Add this in Tutorials Section.
    XiNiX InfoTech Pvt. Ltd. ( Since 2005 ) : Quality Hosting @ Your Price !
    [ US/NL/IN ] Shared Hosting ♦ WHM Reseller ♦ VPS ♦ Dedicated Servers
    █ Included WHMCS ♦ SSL ♦ Domains ♦ IPMI ♦ SolusVM Visit Us Now

  5. #5
    Join Date
    Dec 2013
    Posts
    70
    Is all of this done in the general directory structure? Will I have to add anything to Apache?

  6. #6
    Join Date
    Aug 2010
    Location
    Sorting Office
    Posts
    6,902
    Quote Originally Posted by XiNiX View Post
    Im Gonna Add this in Tutorials Section.
    Then it's probably worth adding that each of the 2 domains would still need their own individual licence (in case anyone gets the wrong idea ), and this type of workaround wouldn't be covered by WHMCS support.
    There's no such thing as an unmanaged server - It's actually self-managed. Worth remembering next time you're looking for someone to complain to.
    DATA VALUATION SERVICE: Your data's value is linked directly to your backup strategy. If YOU don't have your own backups then YOU value your data at ZERO. So why should anyone else care when you lose it?

Similar Threads

  1. WHMCS - No branding
    By jhave in forum Hosting Software and Control Panels
    Replies: 1
    Last Post: 12-29-2013, 01:37 PM
  2. Number of installations for WHMCS license
    By Wes0805 in forum Hosting Software and Control Panels
    Replies: 2
    Last Post: 12-04-2010, 12:09 AM
  3. Running two PHP5 installations
    By tandraicel in forum Hosting Security and Technology
    Replies: 5
    Last Post: 06-23-2010, 02:45 PM
  4. WHMCS (No Branding) & Kayako SupportSuite (No Branding) for sale!
    By Veltrap in forum Software & Scripts Offers
    Replies: 14
    Last Post: 11-03-2009, 04:29 PM
  5. WHMCS no branding
    By JMele in forum Software & Scripts Offers
    Replies: 12
    Last Post: 10-28-2009, 09:13 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •