How do i allow my users to use custom domains on AppHarbor?

故事扮演 提交于 2019-12-22 14:59:14

问题


Free users will get a url like user1.myapp.com The paid ones will be able to point their domains to my app. And my app will serve specific content based on the domain name.

Is this possible with AppHarbor? Is yes how?


回答1:


Yes, it is possible to use custom hostnames on AppHarbor.

If you go to the list of your applications on AppHarbor and click the application, you can click "Hostnames" in the navigation shown left. When you add a hostname there will be instructions on how you need to configure the DNS.

The DNS can be configured in two ways:

  1. You can use an A record which will point the domain to the IP address. This is required for root domains (example.com).

  2. You can use a CNAME record which will reference the existing A record AppHarbor maintains, which is better in most cases as you'll not need to maintain DNS yourself.

There is currently no way to add hostnames via the API, although you can easily wrap something up that will issue HTTP requests similar to those of the website.



来源:https://stackoverflow.com/questions/8868881/how-do-i-allow-my-users-to-use-custom-domains-on-appharbor

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!