|
...
|
...
|
@@ -195,17 +195,36 @@ class DomainInfoLogic extends BaseLogic |
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//如果要开通amp站点,判断m域名是否已经解析
|
|
|
|
if(isset($this->param['amp_status']) && $this->param['amp_status'] == 1){
|
|
|
|
$domain_array = parse_url($info['domain']);
|
|
|
|
$host = $domain_array['host'] ?? $domain_array['path'];
|
|
|
|
$host_array = explode('.',$host);
|
|
|
|
if (count($host_array) <= 2) {
|
|
|
|
array_unshift($host_array, 'm');
|
|
|
|
|
|
|
|
if($this->param['type'] == 3){
|
|
|
|
//需要申请通配符证书,判断_acme-challenge是否已经解析
|
|
|
|
$host_array_ssl = $host_array;
|
|
|
|
if (count($host_array_ssl) <= 2) {
|
|
|
|
array_unshift($host_array_ssl, '_acme-challenge');
|
|
|
|
} else {
|
|
|
|
$host_array_ssl[0] = '_acme-challenge';
|
|
|
|
}
|
|
|
|
$ssl_domain = implode('.',$host_array_ssl);
|
|
|
|
|
|
|
|
$ssl_records = dns_get_record($ssl_domain,DNS_CNAME);
|
|
|
|
$ssl_target = $ssl_records[0]['target']??'';
|
|
|
|
if($ssl_target != '_acme-challenge.globalsosslcheck.com'){
|
|
|
|
$this->fail('域名' . $ssl_domain . '未解析至目标服务器');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(isset($this->param['amp_status']) && $this->param['amp_status'] == 1){
|
|
|
|
//需要开通amp站点,判断m域名是否已经解析
|
|
|
|
$host_array_amp = $host_array;
|
|
|
|
if (count($host_array_amp) <= 2) {
|
|
|
|
array_unshift($host_array_amp, 'm');
|
|
|
|
} else {
|
|
|
|
$host_array[0] = 'm';
|
|
|
|
$host_array_amp[0] = 'm';
|
|
|
|
}
|
|
|
|
$amp_domain = implode('.',$host_array);
|
|
|
|
$amp_domain = implode('.',$host_array_amp);
|
|
|
|
if(!check_domain_record($amp_domain, $serversIpInfo)){
|
|
|
|
$this->fail('AMP站点域名' . $amp_domain . '未解析至目标服务器');
|
|
|
|
}
|
...
|
...
|
|