Forums

Flask and PA as second app

Hi, I am hosting web2py on <user>pythonanyware.com which works fine :) Even the redirection from several of my domains.

Now I want to redirect another domain to a Flask App. How do I do that? Thanks, Richard

Normally that would be something you'd set up with the registrar -- most of them offer free HTTP redirection services. Unless I'm misunderstanding what you want to do?

The issue is how do I access the second (or third) app who are have the name of my non-PA domain. I see the CNAME records and redirections always pointing to richdijk.pythonanyware.com. So I was thinking PA will do the routing to the second (or third) app. The /var/www_<app2 domain>_wsgi.py should do the routing I think, but he is not.

What's the domain you're having trouble with? (If you want to keep things private, you can send me the details using the "Send feedback" link above and we can continue the conversation over email.)

Giles, thank you, nothing to hie :)

I want the second app serving domain www.pastasaus.org registered at yourhosting. Should be possible I think/hope.

btw I like pasta :)

I do too!

So you want the domain www.pastasaus.org to display the web app of that name that you have running at PythonAnywhere? To do that, you need to go to your DNS provider (probably the same as your domain registrar) and set up a CNAME for www.pastasaus.org pointing to richdijk.pythonanywhere.com.

(Don't be confused by the fact that you also have a web app at richdijk.pythonanywhere.com -- there's no need for the two web apps to be the same. The CNAME just tells browsers which one of our load-balancers to talk to, and PythonAnywhere works out which site to display separately.)

ok, I removed the redirection and added CNAME www.pastasaus.org -> richdijk.pythonanywhere.com Checking a DNS tool indicate that this is ok. But opening www.pastasaus.org result in the hosting party website :(

It looks OK to me now -- perhaps just slow DNS propagation? Try holding down shift as you hit the reload button, too -- if you're using Chrome, it might be caching old DNS settings.

Perfect a fresh Firefox confirm that you earn a nice plate of pasta :). Thank you.

Awesome, thanks for confirming!