且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何实现xxx.domainname.com网址格局?

更新时间:2021-09-15 08:39:22


  1. 您需要一台能够解析的DNS服务器任何子域名作为服务器的地址,

  2. 你j2ee应用程序可以从请求标题中获取主机名

更新:以下是BIND区域文件的示例:

UPDATE: here is a example of a BIND zone file:

$ttl 38400
mauriceperry.ch.    IN  SOA ks31441.kimsufi.com. maurice.mauriceperry.org. (
            1237374933
            10800
            3600
            604800
            38400 )
mauriceperry.ch.    IN  NS  ks31441.kimsufi.com.
mauriceperry.ch.    IN  NS  ns.kimsufi.com.
*   IN  A   213.186.61.21

此处xxx.mauriceperry.ch将解析为213.186。 61.21无论xxx是什么。

Here xxx.mauriceperry.ch will resolve to 213.186.61.21 whatever xxx is.