I have this working in an MVC project on IIS by adjusting the hosts file.
我在IIS上的MVC项目中通过调整主机文件使其工作。
When running an Azure project, I can see some ports getting remapped, not sure what thats doing or how I can set up subdomains, is it also done in the hosts file?
在运行Azure项目时,我可以看到一些端口被重新映射,不知道这是在做什么,也不知道如何设置子域,这在主机文件中也是这样做的吗?
1 个解决方案
#1
2
Working with subdomains is possible in Windows Azure. If you need to map these subdomains to different web applications, you'll need to map these in your service configuration (hostHeader attribute):
在Windows Azure中可以使用子域。如果需要将这些子域映射到不同的web应用程序,则需要在服务配置(hostHeader属性)中映射这些子域:
<Binding name="Endpoint1" endpointName="Endpoint1" hostHeader="app.litware.com" />
When developing locally, you can do this using host headers like you described. If you want to deploy to production, you'll need to configure a CNAME on your domain.
当在本地开发时,您可以使用主机头来实现这一点,如您所述。如果要部署到生产环境,需要在域上配置CNAME。
Resources
资源
- http://www.wadewegner.com/2011/02/running-multiple-websites-in-a-windows-azure-web-role/
- http://www.wadewegner.com/2011/02/running-multiple-websites-in-a-windows-azure-web-role/
- http://blog.smarx.com/posts/custom-domain-names-in-windows-azure
- http://blog.smarx.com/posts/custom-domain-names-in-windows-azure
#1
2
Working with subdomains is possible in Windows Azure. If you need to map these subdomains to different web applications, you'll need to map these in your service configuration (hostHeader attribute):
在Windows Azure中可以使用子域。如果需要将这些子域映射到不同的web应用程序,则需要在服务配置(hostHeader属性)中映射这些子域:
<Binding name="Endpoint1" endpointName="Endpoint1" hostHeader="app.litware.com" />
When developing locally, you can do this using host headers like you described. If you want to deploy to production, you'll need to configure a CNAME on your domain.
当在本地开发时,您可以使用主机头来实现这一点,如您所述。如果要部署到生产环境,需要在域上配置CNAME。
Resources
资源
- http://www.wadewegner.com/2011/02/running-multiple-websites-in-a-windows-azure-web-role/
- http://www.wadewegner.com/2011/02/running-multiple-websites-in-a-windows-azure-web-role/
- http://blog.smarx.com/posts/custom-domain-names-in-windows-azure
- http://blog.smarx.com/posts/custom-domain-names-in-windows-azure