我在一台装有 nginx/1.6.2 的 Debian 8 服务器上托管mainsite.com
。othersite.net
最近我发现 Google 已将其编入索引hostmaster.othersite.net
,并且此子域显示了 的全部内容mainsite.com
。
我在 DNS 查找工具中看到此子域名为SOA
指向的记录[email protected]
,但它不在主机提供商的控制面板中。它在哪里,我该如何删除此重定向?
DNS 记录:
CNAME | *.mainsite.com | is an alias of mainsite.com. | 1800
A | mainsite.com | directs to xx.xx.xx.xx | 1800
NS | mainsite.com | directs to ns1.digitalocean.com. | 1800
NS | mainsite.com | directs to ns2.digitalocean.com. | 1800
NS | mainsite.com | directs to ns3.digitalocean.com. | 1800
CNAME | *.othersite.net | is an alias of othersite.net. | 1800
A | othersite.net | directs to xx.xx.xx.xx | 1800
NS | othersite.net | directs to ns3.digitalocean.com. | 1800
NS | othersite.net | directs to ns1.digitalocean.com. | 1800
NS | othersite.net | directs to ns2.digitalocean.com. | 1800
简化nginx.conf
(仅location
删除 www 重定向):
server {
listen 443 ssl default_server;
ssl_certificate /etc/letsencrypt/live/mainsite.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/mainsite.com/privkey.pem;
server_name mainsite.com;
root /home/mainsite/html;
}
server {
listen 80;
server_name mainsite.com;
return 301 https://mainsite.com$request_uri;
}
server {
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/othersite.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/othersite.net/privkey.pem;
server_name othersite.net;
root /home/othersite/html;
}
server {
listen 80;
server_name othersite.net;
return 301 https://othersite.net$request_uri;
}