Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
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
Re: http to https in textpattern
Same with “all-inkl” in Germany :-)what a pleasure to install an LE certificate in 2 clicks and 10 seconds!
TXP Builders – finely-crafted code, design and txp
Offline
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
Re: http to https in textpattern
webfaction.com is still out to lunch on this issue
…. texted postive
Offline
Offline
Re: http to https in textpattern
Offline
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
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
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