子域上的IPV6

时间:2016-09-28 17:32:20

标签: nginx dns ipv6 centos6 vhosts

我想在域上使用ipv4,在子域名中使用ipv6。我已经将记录@和WWW设置为ipv4和AAAA记录试用ipv6 例如,我的域名是example.com,我的子域名是trial.example.com

我现在可以访问我的域名,但不能访问子域名。对于info我使用centminmod并托管DO,我的注册商来自namecheap。我已经改变了NGINX_IPV =' y' 这里是我的vhost for subdomain

 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;

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/vts_server.conf;
}

任何建议如何解决这个问题?我错过了什么吗?任何帮助都会感激。感谢

1 个答案:

答案 0 :(得分:0)

你应该删除 return 301 $scheme://trial.example.com$request_uri;
禁用Web浏览器缓存,然后重试。