Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2018-09-03 18:06:41

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,595
Website

Re: http to https in textpattern

jpdupont wrote #313792:

No Jakob, I do not have this line in my .htaccess file. I have not passed version 3 of the certificate installation yet … I do this to create my “secure” website: I choose the shared certificate. Then I create the correct certificate for the domain, then return to websites to assign the definitive certificate. With this procedure, I no longer have the error message that I sometimes had .well-known not accessible.

Interesting. So by setting Webfaction’s shared certificate first before running the will-in-wi script, you allow LetsEncrypt to get through via https to do its validation. Then after that you set it back to the new certificate. Thereafter, it should be able to renew via https because the previous LetsEncrypt certificate you’re about to renew is still active.

That would explain why you don’t need two webapps, and why you don’t have the htaccess line allowing http access to the .well-known directory. I suppose the only ‘downside’ with your method is having to do the manual setting at the beginning, but it’s not that bad because you should only ever need to do that once the very first time you set up a certificate…


TXP Builders – finely-crafted code, design and txp

Offline

#38 2018-09-03 18:30:09

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: http to https in textpattern

When I first started using LE on WF, I used Neil Pang’s acme.sh shell only, which was a general tool, not geared specifically for WF. So the process for making that work was exactly like JP is doing, more or less. That was the way to do it at the time. I never changed my setup, which is why I started having problems recently when switching to the Will-in-Wi method.

WebFaction did tell me that while I wasn’t doing it wrong, exactly, neither was I doing it in the ideal way anymore if using Will-n-Wi’s (man, I hate typing that), which now seems to be the double-website process as Jakob and I have been commenting on.

So, as much as it’s a pain (and I know), you (JP) probably want to think about upgrading to WillnWi’s v.3, adjusting your setup in WF dashboard, and adding the .well-known exception in the mod_rewrite rules as noted. You’ll probably have fewer problems in the longer run if you do.

But, as they say, you’re mileage (kilometres) will vary. ;)

Offline

#39 2018-09-03 18:49:33

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Re: http to https in textpattern

Thank you very much, Destry and Jakob, for your advice and for the long explanation that I will read in a few days … before embarking on version 3 ;-)

Offline

#40 2018-09-06 15:39:59

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Re: http to https in textpattern

I am currently testing the French host o2switch.fr: what a pleasure to install an LE certificate in 2 clicks and 10 seconds!

Offline

#41 2018-09-06 17:07:12

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,595
Website

Re: http to https in textpattern

what a pleasure to install an LE certificate in 2 clicks and 10 seconds!

Same with “all-inkl” in Germany :-)

TXP Builders – finely-crafted code, design and txp

Offline

#42 2018-09-06 20:06:38

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,137
GitHub

Re: http to https in textpattern

Lots of UK hosts offer Let’s Encrypt! via their control panel and it takes a few seconds. It’s been interesting watching the hosts change tack over the last few years as these free alternative challenges their pay-for cert options in many cases.

…but then if they were resistant to free and open https, that’d be slow commercial suicide. Adapt or die, I guess.

Offline

#43 2018-09-07 01:46:38

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,075
Website Mastodon

Re: http to https in textpattern

webfaction.com is still out to lunch on this issue


…. texted postive

Offline

#44 2018-09-13 15:14:03

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,075
Website Mastodon

Re: http to https in textpattern


…. texted postive

Offline

#45 2018-09-13 18:41:57

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: http to https in textpattern

bici wrote #314002:

Released today ! Yay !

?

So much for needing to write those instructions. I’ll take it.

Offline

#46 2018-09-13 19:08:18

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: http to https in textpattern

At last!


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#47 2018-09-28 11:49:58

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 805
Website

Re: http to https in textpattern

jakob wrote #311998:

Thank you Jakob … nice to have found your great post.

Step 1: add this line to your config.php:

define('PROTOCOL', 'https://');...

How exactly, something like this?

<?php
$txpcfg['site_url'] = define('PROTOCOL', 'https://');
?>

[edit] It seems the above snippit is correct … :o

And with this in the .htaccess file:

# Class B (no www) redirects > 
	RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
	RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

… everything you type into the address bar gets this url “https://tvdiever.nl” … and that’s nice … :))

Nevertheless … how to change the .htaccess snippit to redirect everything to “https://www.tv.diever.nl”?

Last edited by RedFox (2018-09-28 12:27:09)

Offline

#48 2018-09-28 15:04:23

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,595
Website

Re: http to https in textpattern

Hi Redfox,

no all you need to add is:

define('PROTOCOL', 'https://');

on a single line to your config.php. The constant PROTOCOL will then be used everywhere else in Textpattern.

I think that class B thing comes from Destry as I hadn’t heard that terminology before. Check the HTML Boilerplate htaccess file. That has alternative redirect instructions for with and without www. You can also manually put https://www. in your redirect above.


TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB