问题
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/
回答1:
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
回答2:
You can add a subdomain by using the heroku domains:add
command.
https://devcenter.heroku.com/articles/custom-domains#add-a-custom-domain-with-a-subdomain
来源:https://stackoverflow.com/questions/36437632/how-to-add-subdomains-in-heroku-in-rails