generalcanvaslms

Enable the Canvas RCE API service

In Canvas LMS packaged by Bitnami 2021.9.15-1 and later versions, the Canvas RCE API service is installed but not enabled by default. This service is required for full text editor capabilities.

IMPORTANT: In order to enable the Canvas RCE API service, it is required to have a domain or subdomain to access the service. For example, if your site is accessible on example.com, a subdomain like rce.example.com will be required.

Follow these steps to enable the Canvas RCE API service:

  • Edit the /opt/bitnami/canvas-rce-api/.env configuration file and configure the protocol on which the service will be exposed:

    • If the service will be exposed via HTTP, ensure that the following line is added:

        HTTP_PROTOCOL_OVERRIDE=http
      
    • If the service will be securely exposed via HTTPS, ensure that the following line is added:

        HTTP_PROTOCOL_OVERRIDE=https
      
  • Update Canvas RCE API service subdomain the /opt/bitnami/canvaslms/config/dynamic_settings.yml file:

      ...
      production:
        ...
        config:
          ...
          canvas:
            ...
            rich-content-service:
              app-host: SUBDOMAIN1
    

    NOTE: Replace the SUBDOMAIN1 placeholder with the appropriate subdomain for the RCE API service. For example, rce.example.com.

  • Enable the Canvas RCE API service:

      $ sudo mv /etc/monit/conf.d/canvaslms-rce-api.conf.disabled /etc/monit/conf.d/canvaslms-rce-api.conf
    
  • Reload Gonit configuration:

      $ sudo gonit reload
    
  • Create a virtual host for HTTP requests for the Canvas RCE API service. Create the /opt/bitnami/apache2/conf/vhosts/canvas-rce-api-vhost.conf file and add these contents:

      <VirtualHost 127.0.0.1:80 _default_:80>
        ServerName SUBDOMAIN1
        ServerAlias SUBDOMAIN2
        ProxyPass / http://127.0.0.1:3000
        ProxyPassReverse / http://127.0.0.1:3000
      </VirtualHost>
    

    NOTE: Replace the SUBDOMAIN1 and SUBDOMAIN2 placeholders with the appropriate subdomains for the service. For example, rce.example.com and www.rce.example.com, respectively.

  • Create a virtual host for HTTPS requests for the Canvas RCE API service. Create the /opt/bitnami/apache2/conf/vhosts/canvas-rce-api-https-vhost.conf file and add these contents:

      <VirtualHost 127.0.0.1:443 _default_:443>
        ServerName SUBDOMAIN1
        ServerAlias SUBDOMAIN2
        SSLEngine on
        SSLCertificateFile "/opt/bitnami/apache2/conf/bitnami/certs/server.crt"
        SSLCertificateKeyFile "/opt/bitnami/apache2/conf/bitnami/certs/server.key"
        ProxyPass / http://127.0.0.1:3000
        ProxyPassReverse / http://127.0.0.1:3000
      </VirtualHost>
    

    NOTE: Replace the SUBDOMAIN1 and SUBDOMAIN2 placeholders with the appropriate subdomains for the service. For example, rce.example.com and www.rce.example.com, respectively.

  • Restart Apache:

      $ sudo /opt/bitnami/ctlscript.sh restart apache
    
Last modification October 19, 2021