ホームページ  >  に質問  >  本文

linux - centos6.5的apache上配置ssl但是仍然无法以https...访问

申请了腾讯云的免费ssl:TrustAsia DV SSL CA - G5,然后下载了证书的相关文件,一共是三个:1_root_bundle.crt,2_www.domain.com.crt 和私钥文件 3_www.domain.com.key,
然后我按照网上搜的各种博客,已经完整的配置在了apache中,etc/httpd/conf.d/ssl.conf里面的相关设置都配置好了,然后外网访问https就是访问不了,
这个是用chrome访问的错误信息:

此网站无法提供安全连接
www.example.com 发送的响应无效。
尝试运行 Windows 网络诊断。
ERR_SSL_PROTOCOL_ERROR

然后我在自己的服务器上wget https...也是连不上,错误信息如下:

--2017-02-13 10:24:04--  https://www.example.com/
Resolving www.example... 119.********
Connecting to www.example.com|119.********|:443... connected.
OpenSSL: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Unable to establish SSL connection.

然后我又查看了apache的错误日志,发现ssl没有错误信息,有的只是apache本身的错误信息:

 [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips configured -- resuming normal operations
 [notice] caught SIGTERM, shutting down
 [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
 [notice] Digest: generating secret for digest authentication ...
 [notice] Digest: done
 [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips configured -- resuming normal operations
 [error] [client 59.172.151.203] File does not exist: /var/www/html/favicon.ico
 [error] [client 180.153.214.200] File does not exist: /var/www/html/1.html
 [notice] caught SIGTERM, shutting down
 [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
 [notice] Digest: generating secret for digest authentication ...
 [notice] Digest: done
 [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips configured -- resuming normal operations
 [notice] caught SIGTERM, shutting down
 [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
 [notice] Digest: generating secret for digest authentication ...
 [notice] Digest: done
 [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips configured -- resuming normal operations
 [notice] caught SIGTERM, shutting down
 [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
 [notice] Digest: generating secret for digest authentication ...
 [notice] Digest: done

然后我再curl命令在服务器上https自己得到以下错误信息:

curl: (35) SSL connect error

而且我在外网这样访问也是可以打开的http://www.example.com:443

以下是我参考并且根据自己的实际环境而设置的文章:
https://www.qcloud.com/docume...
http://www.cnblogs.com/liaoji...
还有很多很多关于配置conf的文章,
求大佬帮我看下,,是在是解决不了了。

补充一下,我查端口的占用情况,发现80端口和443端口都被httpd占用了,但是我在ssl.conf文件中明明写的是443用https啊,,可能这是问题的关键,但是我并不知道如何解决。。

PHP中文网PHP中文网2744日前1016

全員に返信(1)返信します

  • PHP中文网

    PHP中文网2017-04-17 16:43:57

    Alibaba Cloud を使用していますが、正常に設定されました。最初は、ランダムなエラーを報告していましたが、問題を検索しているときに、これを見つけました。open_ssl をインストールした後は、パニックにならずに他の人に助けを求めてください。 ssl.conf を設定する必要があります。Tencent Cloud にはそれがあると思います。関連紹介
    ポート 80 は httpd.conf に設定され、ポート 443 は ssl.conf に設定されています。httpd を再起動してみました。エラーを報告し、競合を表示するので、それは驚くべきことではありません
    私の意見では、ssl.conf の設定に問題がある可能性があります。さあ~

    返事
    0
  • キャンセル返事