我想在我的VPS上设置一个子域。我读过一个教程(http://crm.vpscheap.net/knowledgebase.php?action=displayarticle&id=10),但我认为它不是针对子域的。
本节仅用于我域的一个子域:
;
; BIND data file for linuxconfig.org
;
$TTL 3h
@ IN SOA ns1.linuxconfig.org. admin.linuxconfig.org. (
1 ; Serial
3h ; Refresh after 3 hours
1h ; Retry after 1 hour
1w ; Expire after 1 week
1h ) ; Negative caching TTL of 1 day
;
@ IN NS ns1.linuxconfig.org.
@ IN NS ns2.linuxconfig.org.
linuxconfig.org. IN MX 10 mail.linuxconfig.org.
linuxconfig.org. IN A 192.168.0.10
ns1 IN A 192.168.0.10
ns2 IN A 192.168.0.11
www IN CNAME linuxconfig.org.
mail IN A 192.168.0.10
ftp IN CNAME linuxconfig.org.发布于 2014-12-23 15:55:24
域名和子域名之间没有真正的区别,它们都是DNS系统中的记录。
您已经有了一个www子域作为域名的CNAME,所以您应该能够使用它。当然,您的服务器还需要了解它在面对子域名(主要与HTTP相关,但也需要SMTP (emaiL)服务器需要“知道”它们应该正确地响应子域)时必须做什么。
发布于 2014-12-23 16:14:46
您要设置的子域是什么?
你可以用两种方式来做:
最简单的方法是在$ORIGIN subd.linuxconfig.org. ; SUBD is your subdomain. All records without a '.' in the end use ths suffix until the next origin @ IN A XXX.YYY.ZZZ.PPP www IN CNAME subd.linuxconfig.org. mail IN A XXX.YYY.ZZZ.ABC上方的区域末尾添加以下内容
https://serverfault.com/questions/654430
复制相似问题