Указание на другой домен с использованием CNAME

Я хотел бы указать субдомен, который будет отображаться в другом внешнем домене, с помощью выравнивания CNAME.

например. book.webbangkok.com для отображения на property.thailandbusinessconsultant.com

На webbangkok.com DNS я создал блог CNAME со стоимостью ] property.thailandbusinessconsultant.com . Что мне нужно сделать в DNS для property.thailandbusinessconsultant.com , чтобы отобразить его?

-1
задан 12 July 2019 в 07:11
1 ответ

book.webbangkok.com является субдоменом сопоставлены CNAME с property.thailandbusinessconsultant.com.

DNS не согласен с вами прямо сейчас:

$ dig book.webbangkok.com

[..]

;; ANSWER SECTION:
book.webbangkok.com.    3600    IN  A   104.24.120.92
book.webbangkok.com.    3600    IN  A   104.24.121.92

Нет записи CNAME .

Это будет первое, что нужно исправить, поскольку property.thailandbusinessconsultant.com разрешает два других совершенно разных IP-адреса.

После этого вам необходимо настроить текущий веб-сайт с IP-адресами 104.28.11.67 и 104.28.10.67 ( property.thailandbusinessconsultant.com разрешает тем) принимать соединения для имени book.webbangkok.com .

Таким образом, эмулируя соединение на вашем веб-сайте, так как CNAME был установлен, то есть заставляя разрешение быть на втором наборе IP-адресов:

curl --verbose --resolve book.webbangkok.com:80:104.28.11.67 http://book.webbangkok.com/
* Expire in 0 ms for 6 (transfer 0x55c303be45c0)
* Added book.webbangkok.com:80:104.28.11.67 to DNS cache
* Hostname book.webbangkok.com was found in DNS cache
*   Trying 104.28.11.67...
* TCP_NODELAY set
* Expire in 200 ms for 4 (transfer 0x55c303be45c0)
* Connected to book.webbangkok.com (104.28.11.67) port 80 (#0)
> GET / HTTP/1.1
> Host: book.webbangkok.com
> User-Agent: curl/7.64.0
> Accept: */*
> 
< HTTP/1.1 301 Moved Permanently
< Date: Fri, 12 Jul 2019 04:20:54 GMT
< Transfer-Encoding: chunked
< Connection: keep-alive
< Cache-Control: max-age=3600
< Expires: Fri, 12 Jul 2019 05:20:54 GMT
< Location: https://book.webbangkok.com/
< Server: cloudflare
< CF-RAY: 4f503a33ad2323ac-IAD
< 
* Connection #0 to host book.webbangkok.com left intact

Хорошо, перенаправление на HTTPS, это нормально, но тогда результат не будет:

$ curl --verbose --resolve book.webbangkok.com:443:104.28.11.67 https://book.webbangkok.com/
* Expire in 0 ms for 6 (transfer 0x5572f5fcb5c0)
* Added book.webbangkok.com:443:104.28.11.67 to DNS cache
* Hostname book.webbangkok.com was found in DNS cache
*   Trying 104.28.11.67...
* TCP_NODELAY set
* Expire in 200 ms for 4 (transfer 0x5572f5fcb5c0)
* Connected to book.webbangkok.com (104.28.11.67) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: C=US; ST=CA; L=San Francisco; O=CloudFlare, Inc.; CN=sni.cloudflaressl.com
*  start date: Mar 24 00:00:00 2019 GMT
*  expire date: Mar 24 12:00:00 2020 GMT
*  subjectAltName: host "book.webbangkok.com" matched cert's "*.webbangkok.com"
*  issuer: C=US; ST=CA; L=San Francisco; O=CloudFlare, Inc.; CN=CloudFlare Inc ECC CA-2
*  SSL certificate verify ok.

Это хорошо, проблем с сертификатом нет. Но возвращенная HTML-страница содержит:

<div class="cf-column">
                    <h2>What happened?</h2>
                    <p>Cloudflare is unable to establish an SSL connection to the origin server.</p>
                </div>

                <div class="cf-column">
                    <h2>What can I do?</h2>
                          <h5>If you're a visitor of this website:</h5>
      <p>Please try again in a few minutes.</p>

      <h5>If you're the owner of this website:</h5>
      <p><span>It appears that the SSL configuration used is not compatible with Cloudflare. This could happen for a several reasons, including no shared cipher suites.</span> <a href="https://support.cloudflare.com/hc/en-us/articles/200278659">Additional troubleshooting information here.</a></p>
                </div>

У вас есть ссылка на документацию CloudFlare, чтобы исправить проблему.

0
ответ дан 5 December 2019 в 20:16

Теги

Похожие вопросы