今天使用BT(宝塔)出现了这个问题

2020/11/03 posted in  Tips
[Tue Nov 03 10:01:38.237329 2020] [proxy_fcgi:error] [pid 2405:tid 140039740675840] [client 60.205.xxx.xxx:51754] AH01071: Got error 'Primary script unknown\n'
[Tue Nov 03 10:04:51.147084 2020] [ssl:warn] [pid 21999:tid 140040390793088] AH01909: SSL.target.com:443:0 server certificate does NOT include an ID which matches the server name
[Tue Nov 03 10:05:22.670931 2020] [ssl:warn] [pid 21999:tid 140040390793088] AH01909: SSL.target.com:443:0 server certificate does NOT include an ID which matches the server name

这个问题出现在启用SSL后,在站点的设置选项-》配置-〉找到SSL部分

<VirtualHost *:443>
    ServerAdmin webmasterexample.com
    DocumentRoot "/data/www/wwwroot/target.com/"
    ServerName SSL.target.com
    ServerAlias target.com
    
    #errorDocument 404 /404.html
    ErrorLog "/www/wwwlogs/target.com-error_log"
    CustomLog "/www/wwwlogs/target.com-access_log" combined

其中 ServerName 去掉 SSL. 开头,然后注释掉ServerAlias即可.保存然后重启Apache