I’m on Openshift running Rails 4.
On my local machine I do this to generate certs for my site, and I specify www and non-www because I have to have one cert for each (right?):
sudo ./letsencrypt-auto certonly --manual -d ajdl.co.uk -d www.ajdl.co.uk
And then I get my Rails controller to render text based on the URL specified in the letsencrypt program which is running in my shell.
get '/.well-known/acme-challenge/xZap1XGnim..... (etc)' => 'pages#letsencrypt'
class PagesController < ApplicationController def letsencrypt render text: "xZap1XG... (etc)" end end
After hitting enter, the shell immediately returns to the screen which asks me whether I want my IP to be stored and starts a 2nd run-through of the steps. So I change my controller to render text based on the new URL.
Then I hit enter and letsencrypt complains because my first URL is no longer valid!
Does this mean that I have to render two responses on the same page based on whether letsencrypt is trying to access via www or non-www? I’m confused.
Sorry for the noobish question.