Profile Domains

  • Introduction

    The Profile Domains module allows you to map add-on domain names to specific profiles.

    For example - let's say your Jamroom is located at:

    https://www.jamroom.net

    and there is a profile called "proxima" located at:

    https://www.jamroom.net/proxima

    So now you want a NEW domain name and URL:

    http://www.proximacore.com

    to point to that Profile and have the URL stay in the URL location window, so the "proxima" profile appears to be a stand alone site located at the URL.

    This is what the Profile Domains module does for your Jamroom.
  • Install the Profile Domains module

    If you have not done so, install and activate the Profile Domains module from the Marketplace:

    ACP -> Core -> Marketplace -> Browse
  • You must have root access on your server in order for this module to work! You will need to add a few lines to the Apache config file for your domain, so must be able to edit your Apache config as well as restart your Apache server.
  • Configuring the Profile Domains module

    Configuring the Profile Domains module
    After installing the Profile Domains module from the Marketplace, the first step is to configure it.

    As a master admin, log in to to your Jamroom and go to the ACP -> Profiles -> Profile Domains module.

    Click on the "Global Config" tab and make sure the Create Apache Include option is checked and SAVE.
  • This guide assumes you know how to edit and save files via SSH on your Jamroom Server - if you are not familiar with this you could cause your Apache server to stop working, so please make sure and find someone to assist you if you are unsure of what you are doing!
  • Configure Apache to include the Profile Domains config

    The next step is to update the Apache config for your domain so it will "Include" the configuration that is generated by the Profile Domains module. This step only needs to be done once.

    We will use the Apache config for Jamroom.net as an example.

    1) - Log in to your server via SSH and go to the /etc/apache2/sites-available directory and find the Apache config file for your site - i.e. "001-jamroom.net.conf" (use the name of YOUR config file on YOUR server)

    2) Edit this file in your editor - i.e. "pico 001-jamroom.net.conf"

    3) Add the following lines to the config file, right under the ServerName directive:

    IncludeOptional /jamroom_directory/data/media/0/0/apache_server_alias_*.conf
    

    Replace jamroom_directory with the ACTUAL DIRECTORY your Jamroom is located in. If your Jamroom is in /var/www it would be:

    IncludeOptional /var/www/data/media/0/0/apache_server_alias_*.conf
    

    4) Save the file

    5) Restart Apache:

    service apache2 restart
    
  • Configure Apache: for CPanel / WHM Users

    Make sure and follow this guide:

    https://documentation.cpanel.net/display/EA/Advanced+Apache+Configuration

    If you are on a CPanel / WHM server.

    You do not want to directly edit the Apache virtual hosting config file - when a change is later made in WHM your changes could be overwritten.
  • Add a Profile Domain

    Add a Profile Domain
    The next step is to add a Profile Domain and Map it to an existing profile.

    As a master admin, log in to your Jamroom and to to ACP -> Profiles -> Profile Domains and you should be in the "Profile Domains" tab - if not, click on it.

    You will see a small form with 3 fields:

    Domain Name - enter JUST the domain name here - i.e. "proximacore.com"

    Profile Name - search and select the Profile you want to map this domain to

    Active - This will make the domain "active" - leave this unchecked for now.

    Save the new domain mapping.
  • Modify the New Domain Mapping

    Modify the New Domain Mapping
    After you have created the new mapping, click on the "Modify" button for the new domain in the Mapped Profile Domains browser.

    Here you can decide if the domain should be a "bare" domain or use "www" - this is strictly a cosmetic choice, but some sites like to use "www" while others do not.

    If you want to have "www" before the domain name, make sure the "Use WWW" checkbox is checked, then save.
  • Add domain to the Core "Allowed Domains"

    The next step is to add the domain to the System Core "Allowed Domains" setting:

    - Log in as the master admin
    - go to the ACP -> Core -> System Core -> Global Config
    - in the "Allowed Domains" text area enter the new domain on a line by itself, and save.
  • screenshot of the ALLOWED DOMAINS section in the ACP
  • Activate the domain ONLY after updating DNS

    Once the mapped domain has been configured in Jamroom, DNS needs to be updated for the domain (at the domain registrar) to have it "point" to your Jamroom site.

    This needs to be done at the domain registrar. You should be familiar with how to do this - if you're not you need to contact your hosting provider or system administrator for assistance.

    To "point" the domain at your Jamroom site, you need to CREATE (or update) a DNS "A Record" that points the domain to your Jamroom server IP Address - i.e.

    domain.com -> 111.111.111.111

    Where 111.111.111.111 is the IP Address of your main Jamroom server.

    Once DNS has been updated AND is resolving (i.e. when you type in the domain name you are directed to your Jamroom site) THEN you can set the mapped domain to "active".
  • If you set a mapped domain to "active" before DNS has updated, the profile you have mapped to the domain will NOT work! Make sure DNS has fully propagated before you activate the domain mapping. (if you've already done this, delete the mapping and re-add it.)
  • Supporting SSL for multiple domains (SNI)

    If you are running your site in SSL, and would like your mapped domains to also use SSL, you can check the "Enable SSL" option in the mapped domain config.

    HOWEVER - this will set the domain up to use SSL on the SAME IP Address as your Jamroom site, which means the mapped domain will use "SNI" (server Name Indication):

    http://en.wikipedia.org/wiki/Server_Name_Indication

    for SSL. All newer browsers support SNI, but some old browser do NOT. If your audience is using older browsers then this means when they go to the mapped domain they will instead see your Jamroom site.
  • Supporting SSL for multiple domains with individual IP Addresses

    If you want to support mapped domains that have their own custom IP Address, you can do so - just make sure the "Use SSL" option is NOT checked in the config for the mapped domain.

    You will need to manually create a domain config that includes the SSL certificates and configuration for the mapped domain in an Apache virtual host config file (/etc/apache2/sites-available) and manually "activate" it - i.e.

    a2ensite proximacore.com
    

    This effectively makes the SSL work "outside" the module, but with the domain active the Jamroom Core will still pick it up and rewrite/route things correctly.

Share This

Tags