无法通过SSL连接到LAMP Server

时间:2019-03-07 11:24:00

标签: ssl openssl apache2 lamp apache2.4

我的服务器在Debian 9,Apache / 2.4.25,PHP7.0.33上运行。 现在,我尝试实现Https连接。为此,我使用ssl-cert软件包自动创建了Cert,但是我也尝试了几次使用openSSL手动创建它。

我的default-ssl.conf:

<IfModule mod_ssl.c>
    <VirtualHost ______:443>
            ServerAdmin webmaster@localhost
            DocumentRoot /var/www/html
            ServerName _______

            LogLevel debug

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

            SSLEngine On


            #   A self-signed (snakeoil) certificate can be created by installing
            #   the ssl-cert package. See
            #   /usr/share/doc/apache2/README.Debian.gz for more info.
            #   If both key and certificate are stored in the same file, only the
            #   SSLCertificateFile directive is needed.
            SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
            SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
            <FilesMatch "\.(cgi|shtml|phtml|php)$">
                            SSLOptions +StdEnvVars
            </FilesMatch>
            <Directory /usr/lib/cgi-bin>
                            SSLOptions +StdEnvVars
            </Directory>
    </VirtualHost>

我的ports.conf:

Listen 80
<IfModule ssl_module> Listen 443</IfModule>

在我的Apache error.log中,有一些报告,例如“名称[服务器名称]的证书匹配”,“从[补丁.pem] [路径.key]配置的证书和私钥”,但是没有错误。我的浏览器的Https连接仍然无法正常工作。我在做什么错了?

问候

0 个答案:

没有答案