我在Namec堆上买了一个便宜的域名。它托管在AWS EC2 Linux实例上。我是通过53号公路设置的。根域正常工作。
我想要做的是让一个子域工作,比如apex.rootdomain.com,而且我遇到的麻烦比我想象的要多。我认为这将比设置根域容易得多(由于我发现了一篇很棒的文章,这实际上非常简单)。
这是我的apache2.conf:
<Directory /html/root>
Options FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<Directory /html/apex>
Options FollowSymLinks
AllowOverride None
Require all granted
</Directory>以下是etc/apache2/sites available/MyConfig.conf中的配置文件:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /html/root
ServerName www.root.com
ServerAlias root.com
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:80>
ServerName apex.root.com
DocumentRoot "/html/apex"
</VirtualHost>我相信我的apache2.conf和MyConfig.conf都是正确的,因为它们适用于我的主域。
下面是我如何在53号公路上设置子域:
编辑
我只想补充一句,我等了两三天才知道这个问题是否会自行解决,但事实并非如此。Namec堆说,更改生效所需的时间不到48小时。
编辑:区域文件
root.com托管区域
NAME TYPE VALUE
root.com. A Elastic-IP
root.com. NS Domain-Name-A.
Domain-Name-B.
Domain-Name-C.
Domain-Name-D.
root.com. SOA some values that I don't think matter
www.root.com. A Elastic-IP
apex.root.com A Elastic-IP域名服务器:域名-A,域名-B,域名-C,域名-D,域名-E,域名-F,域名-G,域名-H被列为“域名服务器”。
以下是我的Namec堆设置的样子:
NameServers
Customs DNS
- Domain-Name-A
- Domain-Name-B
- Domain-Name-C
- Domain-Name-D 发布于 2019-01-30 04:43:44
假设root.com和www.root.com在当前配置中工作,则如下所示:
root.com. A Elastic-IP
www.root.com. A Elastic-IP
apex.root.com. A Elastic-IP请记住,在GoDaddy上,您的DNS应该如下所示:
@ A Elastic-IP
www A Elastic-IP
apex A Elastic-IPhttps://stackoverflow.com/questions/54433008
复制相似问题