【问题标题】:How to transfer Domain and Create subdomain on Azure Linux VM如何在 Azure Linux VM 上转移域和创建子域
【发布时间】:2015-10-29 17:58:08
【问题描述】:

我们正在将我们的服务器迁移到 Azure Linux VM。

目前我们的 Linux 服务器和 NameServer 托管在 MediaTemple。在 MediaTemple 服务器(虚拟机)上,我们有几个应用程序作为子域运行,我们使用 nginx 作为反向代理服务器。

现在我们已经在 azure 上创建了一个虚拟机 (Linux),我们得到了 DNS:xxx.cloudapp.net。由于我们有多个应用程序,因此我们需要多个子域,例如 abc.xxx.cloudapp.net、abc2.xxx.cloudapp.net ......所以我的问题是我们如何将我们的域转移到 azure VM 以及如何在其中创建子域天蓝色?

【问题讨论】:

    标签: linux azure nginx subdomain cname


    【解决方案1】:

    目前无法创建xxx.cloudapp.net 的子域。

    你可以为这个功能投票here

    但是,如果您有自己的域名,则可以为每个虚拟机设置自定义域名。

    如果你正在使用云服务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
    }
    

    【讨论】:

    • 谢谢。我们已经这样做了,但是当我们 nslookup 时,我们仍然得到 MediaTemple 服务器 IP,而不是 azure VM 服务器 IP。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-04-07
    • 1970-01-01
    • 1970-01-01
    • 2018-03-18
    相关资源
    最近更新 更多