synergetic
synergetic

Reputation: 8066

flask app with subdomain on openshift

I created python flask app, and deployed to openshift. It can be accessed at

https://ledgerware-hj.rhcloud.com

Now I'd like to use subdomain names for language code. On my local pc I added the following line to C:\Windows\System32\drivers\etc\hosts file:

127.0.0.1 ledgerware.dev
127.0.0.1 en.ledgerware.dev

I also configured flask app:

SERVER_NAME = 'ledgerware.dev:5000'

Everything works if I browse to http://en.ledgerware.dev:5000. For openshift I configured flask app to be:

SERVER_NAME = 'ledgerware-hj.rhcloud.com'

But, https://en.ledgerware-hj.rhcloud.com won't work, because there must be other settings to be done. What else should I do to make it work?

Upvotes: 1

Views: 586

Answers (1)

Nam Duong
Nam Duong

Reputation: 851

Here's a blog related to your issue that has some suggestions: https://www.openshift.com/blogs/custom-url-names-for-your-paas-applications-host-forwarding-and-cnames-the-openshift-way

Can you please take a look at it and see if it helps?

Upvotes: 1

Related Questions