问题
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:
You can use an
A
record which will point the domain to the IP address. This is required for root domains (example.com).You can use a
CNAME
record which will reference the existingA
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