Apache-2.2

“SSL 輸入過濾器讀取失敗”Apache 和 443

  • September 10, 2020

我的 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 *: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 不支持基於名稱的虛擬主機上的 SSL,只支持基於 IP 的虛擬主機。所以我改變了它:

<VirtualHost *:443>

經過:

<VirtualHost 192.168.1.1:443>

現在,它似乎有效,我不知道這是否是好的解決方案,但我沒有任何錯誤……

另一個要求是將以下行添加到 VirtualHost SSL 埠 443 指令塊的末尾

SetEnv nokeepalive ssl-unclean-shutdown

如此處所述:

引用自:https://serverfault.com/questions/633787