Heroku CloudFlare No Such App

流过昼夜 提交于 2021-01-06 03:23:29

问题


I read these 2 articles

https://robots.thoughtbot.com/set-up-cloudflare-free-ssl-on-heroku http://www.higherorderheroku.com/articles/cloudflare-dns-heroku/

And trying to use Cloudflare with Heroku:

I have set the 2 CNAME as indicated:

www -> myherokudomain.herokuapp.com

mydomain.com -> myherokudomain.herokuapp.com

And set the DNS accordingly, which work correctly with cloudflare

curl -I mydomain.com                                   
HTTP/1.1 404 Not Found
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Server: cloudflare-nginx

But I am still getting a "Heroku no such app".

Anyone having the same issue?


回答1:


Your heroku app needs to have the custom domain addon for this to work.

https://devcenter.heroku.com/articles/custom-domains




回答2:


It sounds like something is not configured properly at Heroku, so I would check with them. The record is returning a 404.




回答3:


I had a similar issue with my app hosted on Heroku.

For me, accessing my app via www.myowndomain.com works. However, accessing the app directly via the root domain (myowndomain.com) displays a "No Such App" on the heroku platform.

doing a ping on Terminal reveals that:

curl -I www.myowndomain.com (works correctly), while; curl -I myowndomain.com (doesn't work)

So, I added another custom domain name on heroku using 'myowndomain.com' as opposed to the first custom domain 'www.myowndomain.com' which I earlier added.

I copied the target and created a new CNAME record on my Cloudflare account. Cloudflare immediately applied CNAME flattening.

Now, my app can be accessed both via: www.myowndomain.com and directly, via: myowndomain.com



来源:https://stackoverflow.com/questions/32332383/heroku-cloudflare-no-such-app

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