如何在rails中添加heroku中的子域名 [英] How to add subdomains in heroku in rails
问题描述
manager.daycare.no 我有一个应用程序在Ruby on Rails上有多个子域名, :3000 /
worker.daycare.no:3000/
daycare.no:3000/
admin.daycare.no:3000/
parent.daycare.no:3000/
现在我想在heroku上添加这些内容。如何在heroku上添加这些子域名?
我的heroku-app名称是 sufa-travels.herokuapp.com /
据我所知,Heroku不能选择特定的端口来配置您的主机,Heroku也不支持DNS。但是,您可以添加自定义域名和子域名,并从您的域名托管设置重定向到Heroku应用。这里是youtube的小镜头 Youtube
Heroku Doc说:文档
$ heroku域名:add www.example.com`
将www.example.com添加至示例... done
>
$ heroku域名:添加blog.example.com`
将blog.example.com添加到示例中...完成
I have an app in ruby on rails which have multiple subdomains which on localhost are like this
manager.daycare.no:3000/
worker.daycare.no:3000/
daycare.no:3000/
admin.daycare.no:3000/
parent.daycare.no:3000/
Now I want to add these on heroku. How I add these sub domains on heroku?
My heroku-app name is sufa-travels.herokuapp.com/
As I know, you cannot choose specific ports for configure your host in Heroku, also Heroku not supports DNS. But you can add custom domains and subdomains, and from your domain hosting settings, redirecting to Heroku app. Here is little shot from youtube Youtube
Heroku Doc says: Docs
$ heroku domains:add www.example.com`
Adding www.example.com to example... done
>
$ heroku domains:add blog.example.com`
Adding blog.example.com to example... done
这篇关于如何在rails中添加heroku中的子域名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!