我一直在试图让SSL工作,但我卡住了。 我尝试了几个解决scheme,在这里和其他谷歌的结果,但没有运气。
我从https://www.startssl.com/获得了一个免费的证书,我使用的是Windows服务器,客户端是Firefox(代码为ssl_error_rx_record_too_long,其他浏览器提供的信息较less)。 我正在尝试使用Django,但请求从来没有使它到服务器,所以我认为这是无关的; 控制台中没有显示任何内容。 Apache显示httpd没有错误。
该网站的http(不是https)版本正常工作。 向https请求添加:443不会更改错误。
(我认为)httpdconfiguration的相关部分是:
Listen 80 LoadModule ssl_module modules/mod_ssl.so DefaultType text/plain <IfModule ssl_module> SSLRandomSeed startup builtin SSLRandomSeed connect builtin </IfModule> Listen 443 NameVirtualHost 85.223.64.8:80 Include "C:/Users/Mark/Web/Apache/httpd.conf.incl" <VirtualHost _default_:443> # Include expanded LogLevel warn ErrorLog "path/secure.error.log" DocumentRoot "path/www" ServerName django.mverleg.nl ServerAdmin [email protected] ServerAlias *.django.mverleg.nl ProxyPreserveHost On ProxyRequests Off SSLEngine on SSLSessionCache 'shmcb:path/ssl_scache(512000)' SSLSessionCacheTimeout 300 SSLProtocol all -SSLv2 SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM SSLCertificateFile "path/ssl.crt" SSLCertificateKeyFile "path/ssl.key" SSLCertificateChainFile "path/sub.class1.server.ca.pem" SSLCACertificateFile "path/ca.pem" <Location /> UseCanonicalName Off ServerSignature Off AddDefaultCharset utf-8 ProxyPass http://127.0.0.1:8081/ </Location> </VirtualHost>
运行testinghttpd没有提供任何东西。 重新启动时的错误日志:
The Apache2.2 service is restarting. Starting the Apache2.2 service The Apache2.2 service is running. Init: Session Cache is not configured [hint: SSLSessionCache] httpd.exe: Could not reliably determine the server's fully qualified domain name, using 85.223.64.8 for ServerName [Wed Jan 04 01:39:58 2012] [notice] Digest: generating secret for digest authentication ... [Wed Jan 04 01:39:58 2012] [notice] Digest: done
之后,htppd.exe 没有运行(因此没有错误或页面请求响应)。
如果我对VirtualHost部分进行评论,则上面的下一行是:
[Wed Jan 04 01:41:52 2012] [notice] Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.21 OpenSSL/0.9.8l configured -- resuming normal operations
任何帮助将不胜感激。 我认为一切都是根据我发现的各种指南设置的,所以我不能看到什么是错的(承认我不太了解SSL或httpd设置)。
更新后的版本已经实现了下面的一些build议,并显示错误。
令人难以置信的是,它再次爆发… Http网站正在工作和https站点说身份无法validation(这是我猜的一步)。 然后我重新启动服务器,回到旧的情况(无法访问)。 我恢复了改变(我认为是这样…),它仍然是坏的。 任何机会,这与caching或存储密钥或类似的东西,因为它工作了一段时间,当我添加新的mod_ssl? 这没有任何意义,这是让我疯狂的…任何想法? 有一个新的错误:
[Wed Jan 04 03:30:45 2012] [crit] (OS 18)There are no more files. : master_main: create child process failed. Exiting.
在443端口上的IP地址( http://85.223.64.8:443/就像普通的HTTP一样工作),SSL显然没有启用。
请仔细检查您是否启用了mod_ssl (通过您的configuration中的LoadModule ,取决于您使用的是什么)。
如果您尚未指定NameVirtualHost指令,请尝试使用<VirtualHost _default_:443>而不是指定您的IP地址。
你的IfModule行看起来不正确。 我相信它应该是:
<IfModule mod_ssl.c> SSLRandomSeed startup builtin SSLRandomSeed connect builtin </IfModule>
不:
<IfModule ssl_module> SSLRandomSeed startup builtin SSLRandomSeed connect builtin </IfModule>
不知道,但ProxyPassReverse / http://127.0.0.1:8082/可以帮助(文档http://httpd.apache.org/docs/2.1/mod/mod_proxy.html#proxypassreverse )。