Search code examples
wordpresscertificateopenshiftaliaspermalinks

How can I solve the OpenShift Wordpress installation certificate and hence the https permalink issues?


I've migrated my Wordpress blog to OpenShift recently. It works perfect until when you try to add a custom domain alias to your installation.

The OpenShift URL for my blog is blog-latifetunc.rhcloud.com
I added the following URL as alias: blog.latifetunc.com

(Sorry I couldn't attach images since I don't have enough reputation points. Instead I put links to images. This is my first question in StackOverflow.)

http://www.alpertunc.com/q1.png

I successfully added the CNAME record for my domain to point blog.latifetunc.com to blog-latifetunc.rhcloud.com in GoDaddy

http://www.alpertunc.com/q2.png

The problem pops up when I try to reach my blog with this alias. It says:

Safari can't verify the identity of the website "blog.latifetunc.com".
The certificate for this website is invalid. You might be connecting to a website that is pretending to be "blog.latifetunc.com", which could put your confidential information at risk. Would you like to connect to the website anyway?

(I can't even post more than two links without 10 reputation points :( So please put the above URL in front of below images as well.)

q3.png

If you click "Continue" it works fine but this alert is very scary for many users. I searched for hours for a solution with no luck. I considered buying a security certificate as well but then I thought this blog was working with an alias in its previous installation too. However we never had such an alert in browser while visiting either via the main domain or the alias.

The previous installation was on IIS and the binding were as following:

q4.png

Then when my brain was about to explode I found out that the alert is due to https. When I checked Settings from my Wordpress dashboard I realised that somehow OpenShift installs Wordpress on https and sets the permalinks to https.

q5.png

In fact whatever you type that points to *.rhcloud.com is converted to https. I know that because I added the CNAME for www.latifetunc.net to point to blog-latifetunc.rhcloud.com as well but didn't add the alias in OpenShift Applications. So www.latifetunc.net resolves to blog-latifetunc.rhcloud.com but since there is no alias defined (hence there is no vhost entry in Apache) it gives error. But even that error is in port 443!

q6.png

My main problem is to get rid of the certificate error while visiting my blog via my alias domain name. I really appreciate any help on that one.

My related question is that why on earth permalinks start with https on OpenShift Wordpress installation? If I can solve that, probably I'll solve my main problem as well.

Thanks a lot!


Solution

  • I checked blog.latifetunc.com on safari,chrome,firefox, and opera and I didn't get any warnings so you much have figured out a solution. However for others who may stumble across this I've provided some information:

    By default OpenShift applications accept traffic on both http and https. So if you're wanting to have a custom domain but aren't worried about ssl than you can simply just use the http connection to your application (http://myapp.com). If you are wanting to apply a SSL certificate and you're on one of the plans that allow it (bronze or silver). The documentation to apply it, is in the SSL Section of the OpenShift Online User Guide.