我在本地计算机上安装了两个canvas LMS,并希望在不同的端口上运行,
位置一:user @ server:〜$ cd / var / canvas /
位置二:user @ server:〜$ cd / var / directoryname / canvas
安装完全没问题,但我面临的问题是“一个”正在运行,但对于“两个”我发现了一些错误,如
Chrome错误:
此网站无法提供安全连接 192.168.0.6发送了无效响应。 ERR_SSL_PROTOCOL_ERROR
Firefox错误:
安全连接失败
连接到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
我尝试过使用不同的自签名证书
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
谢谢! Anup Kumar Mondal