如何在 Azure Linux VM 上转移域和创建子域
How to transfer Domain and Create subdomain on Azure Linux VM
我们正在将服务器迁移到 Azure Linux VM。
目前我们的 Linux 服务器和 NameServer 托管在 MediaTemple。在 MediaTemple 服务器(虚拟机)上,我们有几个应用程序 运行 作为子域,我们使用 nginx 作为反向代理服务器。
现在我们已经在 Azure 上创建了一个虚拟机 (Linux),我们得到了 DNS:xxx.cloudapp.net。由于我们有多个应用程序,因此我们需要多个子域,如 abc.xxx.cloudapp.net、abc2.xxx.cloudapp.net ... 所以我的问题是我们如何将我们的域转移到 azure VM 以及如何在中创建子域天蓝色?
Currently it isn't possible to create subdomains of xxx.cloudapp.net
.
您可以为该功能投票here。
但是,如果您有自己的域名,则可以为每个 VM 设置自定义域名。
如果您正在使用云服务 there is 一篇关于.
的好文章
如果是单个 VM,请执行以下操作:
在您的域名注册商的控制台中创建 CNAME
记录并将它们绑定到 xxx.cloudapp.net
然后你需要创建 nginx 配置文件并声明每个子域。
server {
server_name example.com;
# the rest of the config
}
server {
server_name sub1.example.com;
# sub1 config
}
server {
server_name sub2.example.com;
# sub2 config
}
我们正在将服务器迁移到 Azure Linux VM。
目前我们的 Linux 服务器和 NameServer 托管在 MediaTemple。在 MediaTemple 服务器(虚拟机)上,我们有几个应用程序 运行 作为子域,我们使用 nginx 作为反向代理服务器。
现在我们已经在 Azure 上创建了一个虚拟机 (Linux),我们得到了 DNS:xxx.cloudapp.net。由于我们有多个应用程序,因此我们需要多个子域,如 abc.xxx.cloudapp.net、abc2.xxx.cloudapp.net ... 所以我的问题是我们如何将我们的域转移到 azure VM 以及如何在中创建子域天蓝色?
Currently it isn't possible to create subdomains of
xxx.cloudapp.net
.
您可以为该功能投票here。
但是,如果您有自己的域名,则可以为每个 VM 设置自定义域名。
如果您正在使用云服务 there is 一篇关于.
的好文章如果是单个 VM,请执行以下操作:
在您的域名注册商的控制台中创建 CNAME
记录并将它们绑定到 xxx.cloudapp.net
然后你需要创建 nginx 配置文件并声明每个子域。
server {
server_name example.com;
# the rest of the config
}
server {
server_name sub1.example.com;
# sub1 config
}
server {
server_name sub2.example.com;
# sub2 config
}