当我尝试在我的OpenSUSE桌面上设置SSL时,我遇到了很大的问题。
通常,apache正在侦听端口443,但是当我尝试转到
https://localhost 浏览器报告SSL问题:"ssl_error_rx_record_too_long“。同样的情况也会发生,当我尝试访问在我的机器上创建的任何vhost(我的所有vhost都是基于ip的)时,我可以手动修复这个问题,方法是:
cd /etc/apache2/vhosts.d
cp vhost-ssl.template mySSL-host.conf
apache2ctl restart这解决了我的https问题,但是所有的vhost都没有了,它们都指向localhost。当我重新启动YaST时- vhosts重新出现,但mySSL-host.conf文件消失,https问题再次出现。
使用YaST在vhost中设置SSL的正确方法是什么,或者至少如何使其与YaST兼容?
发布于 2014-09-04 18:38:19
ssl_error_rx_record_too_long表示错误配置的证书。
确保您的系统中安装了正确的SSL证书。没有这些,HTTPS将无法运行。你可以从像startssl.com这样的公司买到它们
确保您已启用SSL标志:
(特定于suse)
a2enflag SSL
a2disflag NOSSL现在让我们看一下/etc/apache2/vhosts.d/mysslhost.conf中的示例配置
<VirtualHost *:443>
# General setup for the virtual host
DocumentRoot "/srv/www/mysite/"
ServerName www.mysite.com
ServerAdmin webmaster@mysite.com
ErrorLog /var/log/apache2/error_log
TransferLog /var/log/apache2/access_log
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /srv/www/mysite/>
Options +FollowSymlinks
Order allow,deny
Allow from all
</Directory>
SSLEngine on
SSLCipherSuite "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA 3DES RC4 !aNULL !eNULL !LOW !MD5 !EXP !PSK !SRP !DSS +3DES 3DES +RC4 RC4"
SSLHonorCipherOrder on
SSLCertificateFile /etc/apache2/ssl/ssl.crt
SSLCertificateKeyFile /etc/apache2/ssl/ssl.nopassword.key
SSLCertificateChainFile /etc/apache2/ssl/sub.class1.server.ca.pem
SSLCACertificateFile /etc/apache2/ssl/ca.pem
#SSLUseStapling on
#SSLStaplingResponderTimeout 5
#SSLStaplingReturnResponderErrors off
CustomLog /var/log/apache2/access.log combined
ServerSignature On
</VirtualHost>
</IfDefine>
</IfDefine>然后运行rcapache2重新启动
https://stackoverflow.com/questions/24888407
复制相似问题