1

I have installed two canvas LMS on my local computer and want to run on different port,

Location One : user@server:~$ cd /var/canvas/

Location Two : user@server:~$ cd /var/directoryname/canvas

Installation was perfectly fine, but the problem i'm facing is "One" is working but for "Two" I'm geting some error like

Chrome Error:

This site can’t provide a secure connection 192.168.0.6 sent an invalid response. ERR_SSL_PROTOCOL_ERROR

Firefox Error:

Secure Connection Failed

An error occurred during a connection to 192.168.0.6:8080. SSL received a record that exceeded the maximum permissible length. Error code: SSL_ERROR_RX_RECORD_TOO_LONG

Information :

user@server:/etc/apache2/sites-available$ sudo nano one.conf

<VirtualHost ip:80>
  ServerName localhost
  ServerAlias files.localhost
  ServerAdmin email
  DocumentRoot /var/canvas/public
  RewriteEngine On
  RewriteCond %{HTTP:X-Forwarded-Proto} !=https
  RewriteCond %{REQUEST_URI} !^/health_check
  RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L]  
  ErrorLog /var/log/apache2/canvas_errors.log
  LogLevel warn
  CustomLog /var/log/apache2/canvas_access.log combined
  SetEnv RAILS_ENV production
  <Directory /var/canvas/public>
    Allow from all
    Options All
    AllowOverride All
    Require all granted
  </Directory>
</VirtualHost>
<VirtualHost ip:443>
  ServerName localhost
  ServerAlias files.localhost
  ServerAdmin email
  DocumentRoot /var/canvas/public
  ErrorLog /var/log/apache2/canvas_errors.log
  LogLevel warn
  CustomLog /var/log/apache2/canvas_ssl_access.log combined
  SSLEngine on
  BrowserMatch "MSIE [2-6]" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
  BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
  # the following ssl certificate files are generated for you from the ssl-cert package.
  SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
  SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
  SetEnv RAILS_ENV production
  <Directory /var/canvas/public>
    Allow from all
    Options All
    AllowOverride All
    Require all granted
  </Directory>
</VirtualHost>

user@server:/etc/apache2/sites-available$ sudo nano two.conf

<VirtualHost ip:8080>
  ServerName localhost
  ServerAlias files.localhost
  ServerAdmin mail
  DocumentRoot /var/directory/canvas/public
  RewriteEngine On
  RewriteCond %{HTTP:X-Forwarded-Proto} !=https
  RewriteCond %{REQUEST_URI} !^/health_check
  RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L]  
  ErrorLog /var/log/apache2/canvas_errors.log
  LogLevel warn
  CustomLog /var/log/apache2/canvas_access.log combined
  SetEnv RAILS_ENV production
  <Directory /var/directoryname/canvas/public>
    Allow from all
    Options All
    AllowOverride All
    Require all granted
  </Directory>
</VirtualHost>
<VirtualHost ip:443>
  ServerName localhost
  ServerAlias files.localhost
  ServerAdmin mailid
  DocumentRoot /var/directoryname/canvas/public
  ErrorLog /var/log/apache2/canvas_errors.log
  LogLevel warn
  CustomLog /var/log/apache2/canvas_ssl_access.log combined
  SSLEngine on
  BrowserMatch "MSIE [2-6]" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
  BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
  # the following ssl certificate files are generated for you from the ssl-cert package.
  SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
  SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
  # SSLCertificateFile /etc/ssl/certs/edunextgen.crt
  # SSLCertificateKeyFile /etc/ssl/certs/edunextgen.key
  SetEnv RAILS_ENV production
  <Directory /var/directoryname/canvas/public>
    Allow from all
    Options All
    AllowOverride All
    Require all granted

I have tried with different self signed ssl certificates

SSLCertificateFile /etc/ssl/certs/edunextgen.crt
SSLCertificateKeyFile /etc/ssl/certs/edunextgen.key

And also have tried on diferent port

user@server:/etc/apache2$ sudo nano ports.conf

Listen 80
Listen 81
Listen 8080

<IfModule ssl_module>
        Listen 443
</IfModule>

<IfModule mod_gnutls.c>
        Listen 443
</IfModule>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

I don't understand where i'm making the mistakes , please help me to run multiple Canvas LMS on a single server

Thank you! Anup Kumar Mondal

0 Answers0