问题
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