1

我在本地计算机上安装了两个画布 LMS,并希望在不同的端口上运行,

位置一:user@server:~$ cd /var/canvas/

位置二:user@server:~$ cd /var/directoryname/canvas

安装非常好,但我面临的问题是“一”正在工作,但对于“二”,我遇到了一些错误,例如

铬错误:

此站点无法提供安全连接 192.168.0.6 发送了无效响应。ERR_SSL_PROTOCOL_ERROR

火狐错误:

安全连接失败

连接到 192.168.0.6:8080 时出错。SSL 收到超过最大允许长度的记录。错误代码:SSL_ERROR_RX_RECORD_TOO_LONG

信息 :

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

我尝试过使用不同的自签名 ssl 证书

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

并且也尝试过不同的端口

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

我不明白我在哪里犯了错误,请帮助我在单个服务器上运行多个 Canvas LMS

谢谢!阿努普·库马尔·蒙达尔

4

0 回答 0