Problem with split dns?



  • To access internal Web servers from internal network, I use split DNS using a hosts file.

    In that internal network, there is a Varnish server which acts as cache and reserve proxy. I can check its working by checking http header response.

    HTTP/1.1 200 OK
    Date: Wed, 15 Jun 2016 22:28:58 GMT
    Expires: Sun, 19 Nov 1978 05:00:00 GMT
    Cache-Control: public, max-age=43200
    Content-Language: en
    Etag: "1466029738-0"
    Last-Modified: Wed, 15 Jun 2016 22:28:58 GMT
    Vary: Cookie
    Access-Control-Allow-Origin: *
    Content-Type: text/html; charset=utf-8
    X-Varnish: 360929 65936
    Age: 11318
    Via: 1.1 varnish-v4
    X-Cache: HIT
    X-Cache-Hits: 2
    Content-Length: 55245
    Connection: keep-alive

    However when I try to check its working from internal network, I can see following message instead.

    HTTP/1.1 200 OK
    Date: Thu, 16 Jun 2016 01:38:16 GMT
    Server: Apache/2.2.15 (CentOS)
    X-Powered-By: PHP/5.6.21
    X-Drupal-Cache: MISS
    Expires: Sun, 19 Nov 1978 05:00:00 GMT
    Cache-Control: public, max-age=43200
    Content-Language: en
    Link: ; rel="shortlink",; rel="canonical"
    X-Generator: Drupal 7 (http://drupal.org)
    Etag: "1466041096-0"
    Last-Modified: Thu, 16 Jun 2016 01:38:16 GMT
    Vary: Cookie
    Access-Control-Allow-Origin: *
    Connection: close
    Content-Type: text/html; charset=utf-8

    Always sees connection close and no varnish server info. So it's hard to check its health from internal network. Any fix?



  • Fix your split DNS to point to Varnish, not directly to the back end server.



  • Thank you!