So, I run an authoritative DNS server using Bind.
I add subdomains frequently. For some reason, this time, the subdomain I added is pointing to domain.com and not subdomain.domain.com. I don't understand why this is happening.
I added a new A record to my DNS zonefile. It's pointing to the same IP address that all my other subdomains are pointing to. I incremented the serial number. I reloaded bind.
When I visit the subdomain.domain.com, I get whatever is located at domain.com. I've tried now with two subdomains. They are both pointing to domain.com. I've also checked the syslog file for any bind logs, but there are none.
I've changed absolutely nothing in the way that I do things so I'm dumbfounded as to why this is suddenly happening.
I'm relatively new to DNS. Any advice on how to proceed?
EDIT: Here is my nginx server block for the subdomain in question. As well as the nginz server block for the domain.
server {
listen 80;
server_name subdomain.domain.com;
return 301 https://$host$request_uri;
}
server {
listen 443;
include /etc/nginx/ssl;
include /etc/nginx/cert;
server_name subdomain.domain.com;
root /home/jasonaburton/deployments/subdomain/current/public;
access_log /var/log/nginx/subdomain.domain.com.access.log;
error_log /var/log/nginx/subdomain.domain.com.error.log;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
include /etc/nginx/gzip;
location ~* \.php$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param APP_ENV 'env';
add_header X-Frame-Options "DENY";
add_header X-Content-Type-Options "nosniff";
add_header X-XSS-Protection "1; mode=block";
add_header Cache-Control "no-cache, max-age=0, must-revalidate, no-store, private";
}
}
server {
listen 80;
server_name domain.com www.domain.com;
return 301 https://$host$request_uri;
}
server {
listen 443 default_server;
include /etc/nginx/ssl;
include /etc/nginx/pulse-cert;
server_name domain.com www.domain.com;
root /home/jasonaburton/domain.com/current/web;
access_log /var/log/nginx/www.domain.com.access.log;
error_log /var/log/nginx/www.domain.com.error.log;
index index.php;
location ~* \.(js|css|png|jpg|jpeg|gif|ico|woff)$ {
expires 24h;
}
location / {
try_files $uri $uri/ /index.php?$query_string;
}
include /etc/nginx/gzip;
location ~* \.php$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
add_header Cache-Control "no-cache, max-age=0, must-revalidate, no-store";
}
}
Thanks, Jason
dig subdomain.domain.com. @8.8.8.8 A
.