【问题标题】:SNI Error Apache2 LogsSNI 错误 Apache2 日志
【发布时间】:2016-05-05 03:26:46
【问题描述】:

今天我正在查看我在 apache2 中发现此异常的日志。

[ssl:error] [pid 29646] AH02032: Hostname page_not_found provided via SNI and hostname www.site.ltd provided via HTTP are different

由于我对这个主题不是很了解,我阅读了一些指导,但我不太了解如何解决它...... 在我的配置中,我有一个默认的虚拟主机。 apache 或 php 上的任何其他文件都是默认的

我读到当您在一个地方有许多具有不同证书的虚拟主机时会出现问题,但这不是我的情况......

我该如何解决这个问题?下面你能找到配置吗!

PHP 5.6.17-3+deb.sury.org~trusty+1 (cli)

服务器版本:Apache/2.4.7 (Ubuntu)

/etc/host 是默认文件

default-ssl.conf

<VirtualHost *:80>
    ServerName www.site.ltd
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

default-ssl.conf

<IfModule mod_ssl.c>
    <VirtualHost *:443>
        SSLEngine On
        ServerAdmin webmaster@localhost
        SSLStrictSNIVHostCheck off
        ServerName www.site.ltd
        DocumentRoot /var/www/html

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        SSLEngine on

        SSLCertificateFile    /etc/apache2/ssl/site.crt
        SSLCertificateKeyFile /etc/apache2/ssl/site.key

        SSLCACertificateFile /etc/apache2/ssl/intermediate_site_ca.crt

        <FilesMatch "\.(cgi|shtml|phtml|php)$">
                SSLOptions +StdEnvVars
        </FilesMatch>
        <Directory /usr/lib/cgi-bin>
                SSLOptions +StdEnvVars
        </Directory>

        BrowserMatch "MSIE [2-6]" \
                nokeepalive ssl-unclean-shutdown \
                downgrade-1.0 force-response-1.0
        # MSIE 7 and newer should be able to use keepalive
        BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown

    </VirtualHost>
</IfModule>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

【问题讨论】:

    标签: php apache ssl apache2 sni


    【解决方案1】:

    看起来是由于来自客户端(可能是机器人)的狡猾请求,而不是您的配置有问题:https://serverfault.com/questions/561945/conflict-between-sni-and-http-provided-domains

    我想你不是每个请求都得到它吗?如果是这样,请检查那个时间的请求,然后忽略它(或者如果你真的想要阻止该 IP)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-11-02
      • 2018-08-01
      • 2016-04-17
      • 2013-09-29
      • 1970-01-01
      • 2013-06-24
      • 2012-09-26
      • 2017-10-02
      相关资源
      最近更新 更多