“ SSL输入过滤器读取失败” Apache和443


17

我的apache conf有点问题。当我阅读错误日志时,可以看到以下内容:

[client xxx.xxx.xx.xx] AH01964: Connection to child 1 established (server www.mywebsite.com:443)
[client xxx.xxx.xx.xx] AH01964: Connection to child 6 established (server www.mywebsite.com:443)
[client xxx.xxx.xx.xx] AH01964: Connection to child 10 established (server www.mywebsite.com:443)
[client xxx.xxx.xx.xx] AH01964: Connection to child 15 established (server www.mywebsite.com:443)
[client xxx.xxx.xx.xx] AH01964: Connection to child 18 established (server www.mywebsite.com:443)
(70014)End of file found: [client xxx.xxx.xx.xx] AH01991: SSL input filter read failed.
(70014)End of file found: [client xxx.xxx.xx.xx] AH01991: SSL input filter read failed.
(70014)End of file found: [client xxx.xxx.xx.xx] AH01991: SSL input filter read failed.
(70014)End of file found: [client xxx.xxx.xx.xx] AH01991: SSL input filter read failed.
(70014)End of file found: [client xxx.xxx.xx.xx] AH01991: SSL input filter read failed.

有时,这一个:

 (70007)The timeout specified has expired: [client xxx.xxx.xx.xx] AH01991: SSL input filter read failed.

我实际上不知道...所以我的网站是完整的HTTP,但HTTPS中只有两页。这是我的virtualHost:

<VirtualHost *:80>
    ServerName mywebsite.com
    Redirect permanent / http://www.mywebsite.com/
</VirtualHost>
<VirtualHost *:80>
    ServerName www.mywebsite.com
    ServerAlias img.mywebsite.com
    ServerAdmin xxx
    DocumentRoot /home/mywebsite/www/public
    <Directory /home/mywebsite/www/>
        Options Indexes Multiviews FollowSymlinks
        AllowOverride All
        Require all granted
        ErrorDocument 403 http://www.google.com/
    </Directory>
    <Directory /home/mywebsite/www/public/resource/private/>
        Require all denied
        ErrorDocument 403 http://www.mywebsite.com/
    </Directory>
    <Location "/robots.txt">
            Require all granted
    </Location>

    LogLevel info
    ErrorLog ${APACHE_LOG_DIR}/mywebsite_error.log
    CustomLog ${APACHE_LOG_DIR}/mywebsite_access.log combined
</VirtualHost>
<IfModule mod_ssl.c>
    <VirtualHost *:443>
        ServerName www.mywebsite.com
        DocumentRoot /home/mywebsite/www/public
            <Directory /home/mywebsite/www/>
                Options Indexes FollowSymlinks Multiviews
                AllowOverride all
                Require all granted
            </Directory>
        LogLevel info
        ErrorLog ${APACHE_LOG_DIR}/mywebsite_error.log
        CustomLog ${APACHE_LOG_DIR}/mywebsite_access.log combined

        SSLEngine on
        SSLCertificateFile ./mywebsite.crt
        SSLCertificateKeyFile ./mywebsite.key
        SSLCertificateChainFile ./intermediate.crt
    </VirtualHost>
</IfModule>

那么,我在哪里做错了?我找不到...您能帮我吗?

谢谢 :)


我在Apache 2.4.7中遇到相同的问题。这不是SNI支持的问题。也不是“仅仅降低日志级别”是一个真正的答案:)
Iguananaut

Answers:


10

我读到Apache在基于名称的虚拟主机上不支持SSL,仅在基于IP的虚拟主机上不支持SSL。所以我改变了它:

 <VirtualHost *:443>

通过:

 <VirtualHost 192.168.1.1:443>

就目前而言,它似乎有效,我不知道这是否是一个好的解决方案,但我没有任何错误...


1
实际上,Apache的建议和示例配置在此处

10
此解决方案无法解决apache-2.4中的相同问题:(
mircealungu

如果您要尝试通过SSL提供的主机名不只一个,则可能需要添加多个IP。
quickshiftin

1
Apache应该使用相同的IP(使用2.2.12或更高版本的Web服务器,并使用0.9.8j或更高版本的OpenSSL构建)在比IE8 / WinXP更高的客户端上使用相同的IP在多个VirtualHosts上支持SSL。这称为SNI。有讨论在这里。我有它的工作,但这些讨厌的日志消息无处不在!
2015年

它对我不起作用。
QkiZ


0

对我来说,此错误的解决方案非常简单,如下所示(此错误在将文件/文件夹添加为root后显示):

chown www-data: /var/www -R
chmod 755 /var/www -R
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.