安卓手机测试小程序报错:request:fail ssl hand shake error苹果手机数据正常显示

通过https://www.myssl.cn/tools/check-server-cert.html检查发现缺少中间证书

在域名的httpd配置文件中添加SSLCertificateChainFile配置

域名的httpd配置



        DocumentRoot "/var/www/html/website/frontend/web"
        ServerName www.website.com
        ServerAlias website.com
        SSLEngine on
        SSLProtocol -all +TLSv1.1 +TLSv1.2
        SSLCertificateFile /etc/httpd/cert/public.pem
        SSLCertificateKeyFile /etc/httpd/cert/214597670220095.key
        SSLCertificateChainFile /etc/httpd/cert/chain.pem
        ErrorLog "logs/website-error.log"
        CustomLog "logs/website-access.log" common
        
                # use mod_rewrite for pretty URL support
                RewriteEngine on
                # If a directory or a file exists, use the request directly
                RewriteCond %{REQUEST_FILENAME} !-f
                RewriteCond %{REQUEST_FILENAME} !-d
                # Otherwise forward the request to index.php
                RewriteRule . index.php

                # ...other settings...
        



        DocumentRoot "/var/www/html/website/api/web"
        ServerName api.website.com
        SSLEngine on
        SSLProtocol -all +TLSv1.1 +TLSv1.2
        SSLCertificateFile /etc/httpd/cert/public.pem
        SSLCertificateKeyFile /etc/httpd/cert/214597670220095.key
        SSLCertificateChainFile /etc/httpd/cert/chain.pem
        ErrorLog "logs/website_api-error.log"
        CustomLog "logs/website_api-access.log" common
        
                # use mod_rewrite for pretty URL support
                RewriteEngine on
                # If a directory or a file exists, use the request directly
                RewriteCond %{REQUEST_FILENAME} !-f
                RewriteCond %{REQUEST_FILENAME} !-d
                # Otherwise forward the request to index.php
                RewriteRule . index.php

                # ...other settings...
        



        DocumentRoot "/var/www/html/website/backend/web"
        ServerName ht.website.com
        SSLEngine on
        SSLProtocol -all +TLSv1 +TLSv1.1 +TLSv1.2
        SSLCertificateFile /etc/httpd/cert/public.pem
        SSLCertificateKeyFile /etc/httpd/cert/214597670220095.key
        SSLCertificateChainFile /etc/httpd/cert/chain.pem
        ErrorLog "logs/website_ht-error.log"
        CustomLog "logs/website_ht-access.log" common
        
                # use mod_rewrite for pretty URL support
                RewriteEngine on
                # If a directory or a file exists, use the request directly
                RewriteCond %{REQUEST_FILENAME} !-f
                RewriteCond %{REQUEST_FILENAME} !-d
                # Otherwise forward the request to index.php
                RewriteRule . index.php

                # ...other settings...
        



        DocumentRoot "/var/www/html/website/frontend/web"
        ServerName www.website.com
        ServerAlias website.com
        RewriteEngine on
        RewriteCond   %{HTTPS} !=on
        RewriteRule   ^(.*)  https://%{SERVER_NAME}$1 [L,R]



        DocumentRoot "/var/www/html/website/backend/web"
        ServerName ht.website.com
        RewriteEngine on
        RewriteCond   %{HTTPS} !=on
        RewriteRule   ^(.*)  https://%{SERVER_NAME}$1 [L,R]



        DocumentRoot "/var/www/html/website/api/web"
        ServerName api.website.com
        RewriteEngine on
        RewriteCond   %{HTTPS} !=on
        RewriteRule   ^(.*)  https://%{SERVER_NAME}$1 [L,R]

你可能感兴趣的:(httpd)