使用 MVC 通配符证书在 Azure 上托管许多 SSL 站点

发布于 2024-10-27 00:35:08 字数 1099 浏览 2 评论 0原文

以下应用程序当前在我尝试迁移到 Azure 的 Windows 2008 R2 服务器上运行:

第 1 部分

首先,我有以下 ASP.NET MVC 站点,该站点根据第 1 部分的第一部分路由客户DNS 名称:

https://customer1.myAzureSite.com

https://customer2.myAzureSite.com

https://customer3.myAzureSite.com

...

https://customerN.myAzureSite.com

第 2 部分

然后,我还有一个不同的 IIS 网站,仅用于注册/注册

https://enroll.myAzureSite.com

第 3 部分

该应用程序使用 SOA,并且还有另一个网站用于注册业务层:

https://BusinessLayer.myAzureSite.com

到目前为止已完成的工作

我计划使用配置文件中的“sites”标签来设置两个站点。我计划使用 IIS 主机标头来捕获“enroll”和“businesslayer”子域。我有一个具有以下主题名称 *.myAzureSite.com

问题的证书:

如何正确配置我的部署(从 Azure 角度),以便所有主机标头都转到我的 MVC 应用程序,只有一个转到“注册”,另一个转到“businesslayer”

问题:

这能通过 SSL 正常工作吗?

可比较< /a> 需要做什么配置?

The following application currently runs on a Windows 2008 R2 server that I'm attempting to migrate to Azure:

Part 1

First I have the following ASP.NET MVC site that routes customers based on the first part of the DNS name:

https://customer1.myAzureSite.com

https://customer2.myAzureSite.com

https://customer3.myAzureSite.com

...

https://customerN.myAzureSite.com

Part 2

Then, I also have a different IIS website that is used for enrolling/signing up only

https://enroll.myAzureSite.com

Part 3

This application uses SOA, and there is another site for the businesslayer:

https://BusinessLayer.myAzureSite.com

Work done so far

I'm planning on using the "sites" tag in the config file to set up two sites. I plan on using IIS host headers to catch the "enroll" and "businesslayer" subdomains. I have a certificate with the following subject name *.myAzureSite.com

Question:

How do I properly configure my deployment (from an Azure perspective) so that all host headers go to my MVC application, and only one goes to "enroll", and another to "businesslayer"

Question:

Will this work correctly over SSL?

What comparable configuration needs to be done?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

雪花飘飘的天空 2024-11-03 00:35:08

我将从简单的部分开始,您的通配符 SSL 证书应该适合这些网站。您只需确保将 https 端点添加到您的角色并选择适当的证书即可。

据我所知,您需要在服务定义中定义三个站点。第一个默认站点将是您的 MVC 站点。然后为您的企业和注册站点各准备一个。您的网站部分可能如下所示:

 <Sites>
  <Site name="Web">
    <Bindings>
      <Binding name="mvchttp" endpointName="http" />
      <Binding name="mvchttps" endpointName="https" />
    </Bindings>
  </Site>
  <Site name="Enroll" physicalDirectory="\enroll...">
    <Bindings>
      <Binding name="mvchttp" endpointName="http" hostHeader = "enroll.MyAzureSite.Com" />
      <Binding name="mvchttps" endpointName="https" hostHeader = "enroll.MyAzureSite.Com" />
    </Bindings>
  </Site>
  <Site name="BusinessLayer" physicalDirectory="\BusinessLayer...">
    <Bindings>
      <Binding name="mvchttp" endpointName="http" hostHeader = "BusinessLayer.MyAzureSite.Com" />
      <Binding name="mvchttps" endpointName="https" hostHeader = "BusinessLayer.MyAzureSite.Com" />
    </Bindings>
  </Site>
</Sites>

I'll start with the easy part, your wildcard SSL certificate should be fine for these sites. You'll just need to make sure that you add a https endpoint to your role and select the appropriate certificate.

From what I can see, you'll need three sites defined in your service definition. First the default one while will be your MVC site. Then one each for your business and enroll sites. Your sites section might look something like this:

 <Sites>
  <Site name="Web">
    <Bindings>
      <Binding name="mvchttp" endpointName="http" />
      <Binding name="mvchttps" endpointName="https" />
    </Bindings>
  </Site>
  <Site name="Enroll" physicalDirectory="\enroll...">
    <Bindings>
      <Binding name="mvchttp" endpointName="http" hostHeader = "enroll.MyAzureSite.Com" />
      <Binding name="mvchttps" endpointName="https" hostHeader = "enroll.MyAzureSite.Com" />
    </Bindings>
  </Site>
  <Site name="BusinessLayer" physicalDirectory="\BusinessLayer...">
    <Bindings>
      <Binding name="mvchttp" endpointName="http" hostHeader = "BusinessLayer.MyAzureSite.Com" />
      <Binding name="mvchttps" endpointName="https" hostHeader = "BusinessLayer.MyAzureSite.Com" />
    </Bindings>
  </Site>
</Sites>
不喜欢何必死缠烂打 2024-11-03 00:35:08

值得一提的是,在 Windows Azure Web 角色加速器的帮助下,将多个站点部署到 Web 角色最近变得更加容易 - 有关更多信息,请访问 http://waawebroles.codeplex.com/

It's worth mentioning that deploying multiple sites to a web role has recently been made much easier with the help of the Windows Azure Accelerator for web roles - more info at http://waawebroles.codeplex.com/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文