saas-lms setup

tags: saas cpanel saas-lms whm cpanel-api whm-api

steps to set up saas-lms on cpanel hosting

  • upload the code to desired server location

  • get Cpanel api token

    • type api in the search bar , then go to the menu shown in the image below

      Image Not Showing Possible Reasons
      • The image file may be corrupted
      • The server hosting the image is unavailable
      • The image path is incorrect
      • The image format is not supported
      Learn More โ†’

    • create a new token

      Image Not Showing Possible Reasons
      • The image file may be corrupted
      • The server hosting the image is unavailable
      • The image path is incorrect
      • The image format is not supported
      Learn More โ†’

    • after creating the token save it for later use and do not share it with any one

      Image Not Showing Possible Reasons
      • The image file may be corrupted
      • The server hosting the image is unavailable
      • The image path is incorrect
      • The image format is not supported
      Learn More โ†’

  • get WHM api token

    • goto your WHM panel

      Image Not Showing Possible Reasons
      • The image file may be corrupted
      • The server hosting the image is unavailable
      • The image path is incorrect
      • The image format is not supported
      Learn More โ†’

    • Image Not Showing Possible Reasons
      • The image file may be corrupted
      • The server hosting the image is unavailable
      • The image path is incorrect
      • The image format is not supported
      Learn More โ†’

    • Image Not Showing Possible Reasons
      • The image file may be corrupted
      • The server hosting the image is unavailable
      • The image path is incorrect
      • The image format is not supported
      Learn More โ†’

    • save the token for later and do not share it with anyone

      Image Not Showing Possible Reasons
      • The image file may be corrupted
      • The server hosting the image is unavailable
      • The image path is incorrect
      • The image format is not supported
      Learn More โ†’

  • change the config file

    • config/helpers.php

      • change the vendor`s value to config files name for example for config/lms.php to load set "vendor" => "lms"
      • the config file is dynamically loaded in the config/helpers.php file . lets assume we want to load lms.php config file for the application then we have to set 'vendor' => 'lms' in the config/helpers.php file
      • emaple helpers.php file
        Image Not Showing Possible Reasons
        • The image file may be corrupted
        • The server hosting the image is unavailable
        • The image path is incorrect
        • The image format is not supported
        Learn More โ†’
    • now the necessary values have to be set in the lms.php file for the application to function properly

    • config/lms.php

      • change the ftp ip ,user name, and password

      • change the dest path to <wildcard location>/uploads

      • change the db_prefix this usullay is the username followed by an underscore forexample masud_

      • change the api end point prefix on authorization_header , domain_remove_endpoint , domain_add_endpoint , assign_db_user_endpoint and db_create_endpoint . for example if the if the cpanel url is https://example.xyz:2083 change the beginning the end-points with this

      • also have to change the db_user and db_prefix in db_prefix assign_db_user_endpoint & db_create_endpoint

      • change username:api-token in the authorization header of CPANEL and WHM

      • example lms.php file https://pastebin.ubuntu.com/p/WRrPdCHcmR/

enable wild card domain for saas in cpanle

  • Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More โ†’

  • type * in the subdomain input , then click on the document root the path will appear on its own after that click create

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More โ†’