ipv6 on subdomain

Posted September 28, 2016 4.2k views

hi, are its possible use ipv4 on domain and ipv6 on subdomain? i ask to my domain registrar and they say its possible to do. i set A record to @ and www with my ipv4 and AAAA record to ipv6 address. i use centminmod and here my setting for vhost subdomain

server {
listen 80;
listen [2604:180:1::fd2c:e4xx]:80 ipv6only=on;
return 301 $scheme://$request_uri;

access_log /home/nginx/domains/ combined buffer=256k flush=60m;
error_log /home/nginx/domains/;

root /home/nginx/domains/;
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/vts_server.conf;

i already change NGINX_IPV=‘y’
and now i can access my domain but not my subdomain. what i missed? can someone help solve this? thanks

edited by kamaln7

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer


Looking at the server_name setting, it looks like it is set to Have you added a DNS record for Even if you have added a DNS record for, it will still need a separate record for www.* to work as both of them are not related to each other.

If you want it to be accessible from both and, add both to server_name, separated by a space, and make sure that the correct DNS records exist for both of them.