The Elearning Community • Different URL for different nodes
Page 1 of 2

Different URL for different nodes

Posted: Fri May 22, 2020 10:27 am
by neharika
How can I create different URLs and templates for different companies/different nodes?

Re: Different URL for different nodes

Posted: Fri May 22, 2020 11:12 am
by max
Hi, welcome on board.

You need to implement some steps to achieve that, but you do it in a few minutes

1) create different templates for your customers >> you do that by duplicating and renaming the templates folder. Then you can replace company_logo.png, image.jpg, favicon.ico and favicon.png in the duplicated template

2) you assign the different templates to different nodes >> click on the "edit" icon for every node. That way, if a user is in a node, he will see the assigned template after the login

3) you need to create the different URL >> you do that with your DNS panel, not inside Forma. Then make your different URL's point to your platform's IP address or DNS. You normally do that with a CNAME record.

4) Go to https://docs.formalms.org/reference-gui ... ation.html >> point 5 and associate the different URL's to the different templates. >> that way every address will be associated with a different template even in the login page.

Please see the attachment for the correct syntax >> url without http and www, a comma without a space, the template name.

Done!

Re: Different URL for different nodes

Posted: Mon Nov 30, 2020 11:52 am
by vivek.tomar
Hi,

Thanks for the detailed steps but unable to perform step 3 properly. Can anyone please help with how to add the CNAME record along with steps?

Thanks

Re: Different URL for different nodes

Posted: Mon Nov 30, 2020 12:27 pm
by max
Hi Vivek and welcome on board.

step 3 is not done inside forma, you have to go to the control panel of your website. you will probably have a "DNS" section, or "edit DNS"
it really depends on the panel you use, everyone of them will be slightly different. I am sure you'll be able to google how to do this.

Re: Different URL for different nodes

Posted: Mon Nov 30, 2020 1:05 pm
by vivek.tomar
Thanks Max for the quick reply..

Let me brief how we initiated a CNAME record.
We have a domain i.e. xyz.com where we installed Forma application.
1. Installed Forma app
2. Created node named 'abc'
3. Created templates under file manager in cPanel named 'world' (copy of standard folder and renamed it as 'world')
4. Created user in Forma app named 'world'
5. Mentioned below URL under domain template assignment as
world.xyz.com,world
6. Done the cname record in hosting panel like
Type Name content
Cname world xyz.com

When we tried to open this URL i.e. world.xyz.com, default page of website is coming.
Is there any option in Forma app to get the landing page?

Re: Different URL for different nodes

Posted: Mon Nov 30, 2020 1:32 pm
by alfa24
You have to add A record (not CNAME) and configure the virtual host on the server.

Re: Different URL for different nodes

Posted: Mon Nov 30, 2020 6:21 pm
by vivek.tomar
We are using the cPanel based server, that has their own scripts. we cannot add any virtual host entry and if we added, their script will override on every service restart.
Can you please suggest if there is any possibility to map this without virtual host entry.

Re: Different URL for different nodes

Posted: Mon Nov 30, 2020 7:03 pm
by alfa24
I'm quite sure you're missing something as I was able to have it working on many cpanel instances.
Anyway, I'm sorry but yes, vhosts configuration is mandatory.

Re: Different URL for different nodes

Posted: Tue Dec 08, 2020 7:21 am
by vivek.tomar
We tried but no luck.
I believe there is two module of Forma one is the basic and another one is advance. What basic says login page will be common for every customer whereas, in advance we could create separate url for customers. We have done the basic and it is working but we wanted to setup for advance module.
we followed the Forma guideline and setup the two urls for different customer. One is done with A record and another url is done with CNAME record but getting the same error while opening these urls.
Screenshot for your reference ;
http://prntscr.com/vxzlp8

Re: Different URL for different nodes

Posted: Tue Dec 08, 2020 9:03 am
by alfa24
Misconfigured vhosts.
No way.