简体   繁体   English

为带有子域的heroku应用配置CNAME

[英]Configure CNAME for a heroku app with subdomains

Currently i have an app on Heroku with a wildcard subdomain working like this: 目前,我在Heroku上有一个带有通配符子域的应用,其工作方式如下:

client1.myapp.com, client2.myapp.com, ...

This is working fine. 一切正常。 Then, i'd like that each client can access this apps using their own personal domains. 然后,我希望每个客户端都可以使用自己的个人域访问此应用。 So, testing this on my personal domain, i would like to configure test.mydomain.com like this: 因此,在我的个人域上对此进行测试,我test.mydomain.com这样配置test.mydomain.com

CNAME test --- client1.myapp.com

But, this is not working yet. 但是,这还行不通。 I keep getting the heroku error 'No such app, There's nothing here, yet.' 我不断收到heroku错误'No such app, There's nothing here, yet.' .

Not sure what i am missing. 不知道我在想什么。 Is it a problem related to my actual Laravel app? 这与我的实际Laravel应用有关吗? Heroku config? Heroku配置? DNS? DNS?

Thanks in advance for any help. 在此先感谢您的帮助。

Assuming your application will provide an hostname for each client (actually, it would probably be preferable to have a single hostname as in any case it looks like they will all point to the same Heroku app), then you have to complete all these tasks in order to make it work: 假设您的应用程序将为每个客户端提供一个主机名(实际上,最好使用一个主机名,因为在任何情况下看起来它们都都指向同一个Heroku应用程序),那么您必须在Windows中完成所有这些任务。为了使其工作:

  1. Add the subdomain client1.myapp.com as domain attached to the Heroku app 将子域client1.myapp.com作为附加到Heroku应用程序的域添加
  2. Configure the DNS record for client1.myapp.com 配置client1.myapp.com的DNS记录
  3. Ensure client1.myapp.com resolves ( dig client1.myapp.com ) 确保client1.myapp.com解析( dig client1.myapp.com
  4. Add the customer subdomain/domain to your Heroku app, otherwise Heroku will reject routing the requests for that domain 将客户子域/域添加到您的Heroku应用中,否则Heroku将拒绝路由对该域的请求
  5. Configure the DNS record for the customer subdomain/domain to CNAME client1.myapp.com 将客户子域/域的DNS记录配置为CNAME client1.myapp.com
  6. Ensure the customer subdomain/domain resolves 确保客户子域/域解析

According to your issue description, I assume you probably did not configure the customer subdomain/domain as domain to your Heroku app . 根据您的问题描述,我认为您可能未将客户子域/域配置为Heroku应用程序的域

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM