Openshift app redirecting to https://domain_name/app
Asked Answered
M

6

15

I have hosted an app on Redhat Open shift. I didn't change anything but it started redirecting to https://www.plovist.com/app and throwing 404 error. Can anyone help me in solving this?

Motorboating answered 20/3, 2014 at 15:47 Comment(0)
M
6

I logged into Godaddy(my DNS) account and found out that in Cnames(Alias) www wasn't pointing to mydjango-plovist.rhcloud.com(URL given by Openshift). Also I pinged mydjango-plovist.rhcloud.com and it gave a different IP Address than one I had written in A Record. So I pointed in Cname to mydjango-plovist.rhcloud.com and in A Record pointed www to new IP Address I got after pinging mydjango-plovist.rhcloud.com. My app started So Openshift changed their IP Address without telling the users. And also there was some problem in my Godaddy Account.

Motorboating answered 28/3, 2014 at 7:24 Comment(3)
So that's how it works... You need to ping your app first and Openshift can change the IP without further notice.Footlight
Well, you shouldn't have GoDaddy forwarding to your IP. You should forward example.com to www.example.com, then create a CNAME alias from www.example.com to app-domain.rhcloud.com. This means the IP can change and your forwarding won't be affected.Doggone
Luc has it right. The answer above is correct, but misses the point that cloud services like Openshift should never be accessed by their IP addresses as these are subject to change.Namangan
M
6

Make sure that you have correctly added your alias to your application (www.plovist.com)

Manns answered 20/3, 2014 at 15:53 Comment(7)
I read one openshift post about the issue I'm facing and deleted my alias and added it again. Still it's not working. Will it take some time and I need to restart my app? Can there be some issue on the Domain Name provider's side? On default address my site is working : mydjango-plovist.rhcloud.com/conceptMotorboating
Looks like you are using some kind of redirect service for your cname (www.plovist.com) which makes it really hard to troubleshoot, the cname should point to your app-domain.rhcloud.com corey-redhat:~ cdaley$ host www.plovist.com www.plovist.com is an alias for plovist.com. plovist.com has address 50.17.8.22Manns
I have added plovist.com and www.plovist.com as alias.Motorboating
I still don't think whatever service you are redirecting through is working correctly, how is it setup?Manns
In my .htaccess file i'm doing RewriteCond %{HTTP_HOST} !^www\. [NC]Motorboating
I mean your dns is not pointing to your openshift gear, you are using some kind of redirection serviceManns
No I don't think so. It was working fine for 1 year, what happened suddenly. I didn't touch my DNS zone file too. I think problem lies in resolving of Openshift myapp.rhcloud.com to Ip address.Motorboating
M
6

I logged into Godaddy(my DNS) account and found out that in Cnames(Alias) www wasn't pointing to mydjango-plovist.rhcloud.com(URL given by Openshift). Also I pinged mydjango-plovist.rhcloud.com and it gave a different IP Address than one I had written in A Record. So I pointed in Cname to mydjango-plovist.rhcloud.com and in A Record pointed www to new IP Address I got after pinging mydjango-plovist.rhcloud.com. My app started So Openshift changed their IP Address without telling the users. And also there was some problem in my Godaddy Account.

Motorboating answered 28/3, 2014 at 7:24 Comment(3)
So that's how it works... You need to ping your app first and Openshift can change the IP without further notice.Footlight
Well, you shouldn't have GoDaddy forwarding to your IP. You should forward example.com to www.example.com, then create a CNAME alias from www.example.com to app-domain.rhcloud.com. This means the IP can change and your forwarding won't be affected.Doggone
Luc has it right. The answer above is correct, but misses the point that cloud services like Openshift should never be accessed by their IP addresses as these are subject to change.Namangan
C
5

I have the same problem and solved by just restarting the openshift application. After that everythink work as expected.

See also this guide for information on how to change CNAME and create an alias.

https://blog.openshift.com/custom-url-names-for-your-paas-applications-host-forwarding-and-cnames-the-openshift-way/

Copyedit answered 22/11, 2014 at 23:10 Comment(0)
C
0

Had this issue today after some cname changes. For me it helped to flush the dns chache

ipconfig /flushdns

Circuitry answered 6/4, 2016 at 21:17 Comment(0)
H
0

Do anything suggested before or just patiently wait for a hour and check. I think it is just temporary problem of DNS servers. I am sure not only in my case :)

Haro answered 25/6, 2016 at 11:54 Comment(0)
S
0

I resolved it after 2 hours. The issue was, i was missing "www." in openshift alias domain settings. (previously it was domain.com instead of www.domain.com)

I entered www.domain.com and after updating wordpress siteurl/home settings it worked fine.

These comments really helped: https://mcmap.net/q/824757/-dns-settings-openshift-with-cloudflare-rhcloud

Sceptic answered 5/7, 2016 at 12:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.