Learn about Centmin Mod LEMP Stack today
Register Now

IPV6 on Sub Domain

Discussion in 'Domains, DNS, Email & SSL Certificates' started by Megaplex21, Sep 28, 2016.

  1. Megaplex21

    Megaplex21 New Member

    29
    2
    3
    Sep 28, 2016
    Ratings:
    +2
    Local Time:
    7:06 PM
    1.10.1
    Hi guys.. I have a problem with DNS setting with ipv6, i have domain example.com and subdomain trial.example.com, my domain use ipv4 and subdomain use ipv6, i can access my domain now, but for subdomain i don't know what's wrong.

    for info i use registrar from namecheap and hosting fom DO, i already chat with cs from my registrar and she say's the problem not from they side. so i assume my setting in centmin maybe not correct.

    my vhost setting in subdomain like this

    server {
    listen 80;
    server_name www.trial.example.com;
    listen [2604:180:1::fd2c:e4xx]:80 ipv6only=on;
    return 301 $scheme://trial.example.com$request_uri;

    access_log /home/nginx/domains/trial.example.com/log/access.log combined buffer=256k flush=60m;
    error_log /home/nginx/domains/trial.example.com/log/error.log;

    root /home/nginx/domains/trial.example.com/public;
    location ~ (?:^|/)\. {
    deny all;
    }

    location / {

    }

    include /usr/local/nginx/conf/staticfiles.conf;
    include /usr/local/nginx/conf/php.conf;
    include /usr/local/nginx/conf/drop.conf;
    #include /usr/local/nginx/conf/errorpage.conf;
    include /usr/local/nginx/conf/vts_server.conf;
    }

    are my setting already correct? i already change NGINX_IPV='y' based from this link FAQ - CentminMod.com LEMP Nginx web stack for CentOS

    nb: sorry if this thread looks bad, i'm a new member and hope you understand with my language, english is not my own language :p

    if you need more information i will add ASAP, please help me guys. thx
     
  2. dorobo

    dorobo Active Member

    420
    104
    43
    Jun 6, 2014
    Ratings:
    +162
    Local Time:
    8:06 PM
    latest
    latest
    try this

    Code (Text):
    server {
    listen [::]:80;
    server_name www.trial.example.com
    return 301 $scheme://trial.example.com$request_uri;
     
  3. eva2000

    eva2000 Administrator Staff Member

    30,897
    6,908
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,403
    Local Time:
    10:06 PM
    Nginx 1.13.x
    MariaDB 5.5
    server_name seems incorrect with added www. should be without for subdomain if you setup a AAAA record as trial.example.com
    Code (Text):
    server_name trial.example.com;

    for code posting, might want to use CODE tags for code How to use forum BBCODE code tags :)

    so
    Code (Text):
    server {
    listen 80;
    server_name trial.example.com;
    listen [2604:180:1::fd2c:e4xx]:80 ipv6only=on;
    return 301 $scheme://trial.example.com$request_uri;

    but you don't need a return 301 line for subdomain
     
    Last edited: Sep 28, 2016
  4. Megaplex21

    Megaplex21 New Member

    29
    2
    3
    Sep 28, 2016
    Ratings:
    +2
    Local Time:
    7:06 PM
    1.10.1
    i change the code with this
    Code:
    server {
      listen [::]:80;
      server_name trial.example.com;
      return 301 $scheme://trial.example.com$request_uri;
    still can't connect, any suggest?
    if i want use ipv6 on subdomain, am i must set ipv6 to domain?
     
  5. eva2000

    eva2000 Administrator Staff Member

    30,897
    6,908
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,403
    Local Time:
    10:06 PM
    Nginx 1.13.x
    MariaDB 5.5
    how are you testing IPv6 connectivity ?

    does your server have IPv6 enabled itself ? enabling in Nginx isn't enough as your server needs to have working IPv6
     
  6. eva2000

    eva2000 Administrator Staff Member

    30,897
    6,908
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,403
    Local Time:
    10:06 PM
    Nginx 1.13.x
    MariaDB 5.5
    remove return 301 $scheme://trial.example.com$request_uri; as that isn't needed
     
  7. eva2000

    eva2000 Administrator Staff Member

    30,897
    6,908
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,403
    Local Time:
    10:06 PM
    Nginx 1.13.x
    MariaDB 5.5
    did you recompile nginx via centmin.sh menu option 4 after setting NGINX_IPV='y' ?
    what is output of
    Code (Text):
    nginx -V
    

    i should clarify that adding NGINX_IPV='y' to persistent config setting still needs recompile nginx afterwards

    edit: updated FAQ item 34 with clearer instructions for persistent config file method of enabling
     
    Last edited: Sep 29, 2016
  8. Megaplex21

    Megaplex21 New Member

    29
    2
    3
    Sep 28, 2016
    Ratings:
    +2
    Local Time:
    7:06 PM
    1.10.1
    remove return 301 $scheme://trial.example.com$request_uri; - Done
    recompile nginx via centmin.sh menu option 4 after setting NGINX_IPV='y' - Yes, i already did that.
    nginx -V - this is the result
    Code:
    nginx version: nginx/1.10.1
    built by clang 3.4.2 (tags/RELEASE_34/dot2-final)
    built with LibreSSL 2.4.2
    TLS SNI support enabled
    configure arguments: --with-ld-opt='-lrt -ljemalloc -Wl,-z,relro' --with-cc-opt='-m64 -mtune=native -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wno-sign-compare -Wno-string-plus-int -Wno-deprecated-declarations -Wno-unused-parameter -Wno-unused-const-variable -Wno-conditional-uninitialized -Wno-mismatched-tags -Wno-c++11-extensions -Wno-sometimes-uninitialized -Wno-parentheses-equality -Wno-tautological-compare -Wno-self-assign -Wno-deprecated-register -Wno-deprecated -Wno-invalid-source-encoding -Wno-pointer-sign -Wno-parentheses -Wno-enum-conversion' --sbin-path=/usr/local/sbin/nginx --conf-path=/usr/local/nginx/conf/nginx.conf --with-ipv6 --with-http_ssl_module --with-http_v2_module --with-http_gzip_static_module --with-http_stub_status_module --with-http_sub_module --with-http_addition_module --with-http_image_filter_module --with-http_secure_link_module --with-http_realip_module --with-http_geoip_module --with-openssl-opt=enable-tlsext --add-module=../ngx-fancyindex-ngx-fancyindex --add-module=../ngx_cache_purge-2.3 --add-module=../nginx-http-concat-master --add-module=../memc-nginx-module-0.17 --add-module=../srcache-nginx-module-0.31 --add-module=../ngx_devel_kit-0.3.0 --add-module=../set-misc-nginx-module-0.30 --add-module=../echo-nginx-module-0.59 --add-module=../redis2-nginx-module-0.13 --add-module=../ngx_http_redis-0.3.7 --add-module=../nginx_upstream_check_module-0.3.0 --add-module=../nginx-module-vts --add-module=../headers-more-nginx-module-0.30 --with-openssl=../libressl-2.4.2 --with-libatomic --with-pcre=../pcre-8.38 --with-pcre-jit
    You have new mail in /var/spool/mail/root
     
  9. eva2000

    eva2000 Administrator Staff Member

    30,897
    6,908
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,403
    Local Time:
    10:06 PM
    Nginx 1.13.x
    MariaDB 5.5
  10. eva2000

    eva2000 Administrator Staff Member

    30,897
    6,908
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,403
    Local Time:
    10:06 PM
    Nginx 1.13.x
    MariaDB 5.5
    oh and for clarity the faq item 34 example IPv6 ip 2604:180:1::fd2c:e4xx is only example, you need to replace it with your IPv6 single IP address.

    Code (Text):
    server {
    listen 80;
    listen [2604:180:1::fd2c:e4xx]:80 ipv6only=on;
    server_name trial.example.com;
    

    for a specific IPv6 ip assignment

    that's how i have sslspdy.com setup for IPv6 - tests
     
  11. Megaplex21

    Megaplex21 New Member

    29
    2
    3
    Sep 28, 2016
    Ratings:
    +2
    Local Time:
    7:06 PM
    1.10.1
    yup, i already change the value for ipv6. my subdomain is player.bioskopbokep.com i check with this IPv6 test - web site reachability and the result is "This domain has no IPv6 DNS server, this may prevent some IPv6-only users from reaching it." what is that mean?
     
  12. eva2000

    eva2000 Administrator Staff Member

    30,897
    6,908
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,403
    Local Time:
    10:06 PM
    Nginx 1.13.x
    MariaDB 5.5
    ah your DNS provider doesn't support IPv6 ! that is where you DNS nameservers are managed, their servers are not IPv6 ready - shows same at IPv6 domain readiness tester

    You need to change to a DNS name server provider that supports IPv6 !

    nothing to do with Nginx on Centmin Mod then :)
     
  13. eva2000

    eva2000 Administrator Staff Member

    30,897
    6,908
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,403
    Local Time:
    10:06 PM
    Nginx 1.13.x
    MariaDB 5.5
  14. Megaplex21

    Megaplex21 New Member

    29
    2
    3
    Sep 28, 2016
    Ratings:
    +2
    Local Time:
    7:06 PM
    1.10.1
    DNS provider mean domain registrar or hosting? i use namecheap and digital ocean, are they not support for ipv6? in namecheap i use standard nameserver. am i must change with custom namservers? ns1.digitalocean.com. ?
     
  15. eva2000

    eva2000 Administrator Staff Member

    30,897
    6,908
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,403
    Local Time:
    10:06 PM
    Nginx 1.13.x
    MariaDB 5.5
    yeah your DNS provider would be namecheap if you use their namservers. Might want to contact their tech support and ask if their DNS nameservers support IPv6 and might want to ask DigitalOcean too so can switch to theirs if namecheap doesn't
     
  16. Megaplex21

    Megaplex21 New Member

    29
    2
    3
    Sep 28, 2016
    Ratings:
    +2
    Local Time:
    7:06 PM
    1.10.1
    i try change nameserver to digital ocean and now i must wait 48hours to see are its work or not, i'm not ask them first, cause they response so slow. i actually open thread too in their forum. but no response until now. this forum is the best i ever see. thanks eva for your help.

    once more, if nameserver from digital ocean not work, i want to try this method DNS - Cloudflare DNS Only Configuration | Centmin Mod Community are this method can apply only for subdomain? i dont want use CF for domain
     
  17. eva2000

    eva2000 Administrator Staff Member

    30,897
    6,908
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,403
    Local Time:
    10:06 PM
    Nginx 1.13.x
    MariaDB 5.5
    It's for entire domain and subdomains.
     
  18. Megaplex21

    Megaplex21 New Member

    29
    2
    3
    Sep 28, 2016
    Ratings:
    +2
    Local Time:
    7:06 PM
    1.10.1
    ok, we'll see and i will update the result if this work.
     
  19. Megaplex21

    Megaplex21 New Member

    29
    2
    3
    Sep 28, 2016
    Ratings:
    +2
    Local Time:
    7:06 PM
    1.10.1
    hi eva, are you still online? the result showed up. now IPv6 DNS server show the value ns2.digitalocean.com,ns3.digitalocean.com,ns1.digitalocean.com try chek in here IPv6 test - web site reachability but why my subdomain still can't access?
     
  20. eva2000

    eva2000 Administrator Staff Member

    30,897
    6,908
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,403
    Local Time:
    10:06 PM
    Nginx 1.13.x
    MariaDB 5.5
    Probably means DO's nameservers do not support IPv6 either