Simple Machines Community Forum

SMF Support => Server Performance and Configuration => Topic started by: shawnb61 on July 08, 2017, 03:01:04 AM

Title: Converting to https, step-by-step...
Post by: shawnb61 on July 08, 2017, 03:01:04 AM
Having just gone thru this the first time myself, I thought I'd share my notes & explain each step (as best I can, anyway).
This is the stuff I wish I knew up front...  Whether you are doing a new install or trying to diagnose an issue, follow these steps in sequence to get your site up & running.

These steps are generic enough to help you whether you are running under 2.0.x or 2.1.x. 

(1.) Purchase & install your certificate.  Yes, this is the first step.  With a certificate installed, you can run either http:// or https://.  If you do NOT have a certificate installed, you can only run http://.   So... 

If you do NOT have a certificate installed, and you change all your URLs to https://, your site will (POOF!) disappear...  That's because your web server won't serve https:// content without the cert.  Install the cert first...

(2.)  Test your cert, to make sure it is installed & fully operational.  There are lots of tools online that will help you confirm it works.  One such tool:  https://www.sslshopper.com/ssl-checker.html

(3.)  Install an http to https redirect.  Without the redirect, your web server will still attempt to serve up http:// upon request.  So, for example, if you type in your forum's URL with http://, not https://, it will actually execute index.php insecurely.  Themes probably won't work though, so you will probably get that weird, blank-page, text-only version of your site.  A redirect will avoid lots of flaky behavior... 

Here is a good, multi-purpose Apache example right here, that will redirect ALL http:// traffic to https://, and further, tell search engines this is a permanent change:
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


Save the above as a text file named .htaccess, and place it in the root folder of your site.  If you already have an .htaccess file, copy & paste the above at the top of the file. 

There are many other .htaccess examples out there, e.g., if you only want specific folders redirected.  This may be helpful if you have multiple forums, each in separate folders, and only some are https.  If you have such complicated needs, Google is your friend... 

(4.)  If installing...  Run the installer using https://  Using https:// is pretty important, as all URL settings created by the installer are based relative to how you invoke the installer.  Invoking the installer as https:// will make sure all of your URLs internally are https:// at the outset.  If you run the installer with http://, you will have to fix this later using repair_settings.php.

(5.)  If installing 2.1...  Select the Force SSL option.

(6.)  Run repair_settings.php. Use repair_settings.php, to confirm the following URLs are all setup with https://, not http://:
- $boardurl
- Your Smileys URL
- Your Avatars URL
- Your Custom Avatars URL (if you have one)
- Your Theme URL (one for each theme!!!!)
- Your Theme/Images URL (one for each theme!!!!)

Save your settings, exit, & delete repair_settings.php.   

I run repair_settings.php just as a safety measure, just to make sure it all went as expected...  I'm paranoid & like double-checking things...

(7.) If you were running 2.1 already, go to the Admin | Maintenance | Server Settings | General and choose "Force SSL throughout the forum" at the Forum SSL Mode prompt. 

(8.) If running 2.0.14+, or 2.1, consider activating the image proxy.  You probably want to do this if your site has mixed http:// & https:// content.  This happens if your forum members share a lot of images from other websites.  If there are mixed http:// and https:// images on the same webpage, you will at least get a security warning, & you will more likely get broken links.  This is because some browsers will not serve mixed http:// & https:// content as a security feature.  SMF's image proxy feature will download http:// images locally, so SMF can turn around and serve them up https://.  No more 'mixed' content issues.  This will significantly reduce broken links and security warnings on your site.  If your forum members share lots of images, you probably want the image proxy enabled. 

NOTE:  The upgrader doesn't change anything - if it finds a site http://, it leaves it http://.  If it finds a site with https://, it leaves it that way. 

What do you do if you're still having issues?  Run repair_settings.php again & triple-check all your URLs... 

Hope this helps.

EDIT 12/17/20: point to proper repair_settings
Title: Re: Converting to https, step-by-step...
Post by: shawnb61 on July 08, 2017, 09:32:50 AM
Repair_settings may be found here:

https://download.simplemachines.org/index.php?tools

EDIT 12/17/20: point to proper repair_settings
Title: Re: Converting to https, step-by-step...
Post by: shawnb61 on July 08, 2017, 01:53:37 PM
Just ran across a nifty tool that helps you confirm your redirect is working OK:
   http://www.redirect-checker.org/index.php

Title: Re: Converting to https, step-by-step...
Post by: lurkalot on July 08, 2017, 06:32:25 PM
Thanks, handy post.  ;)

Converted a couple of my sites yesterday, before I read this.  Luckily all seems to have gone well.  I will just say though some themes and mods make calls to external scripts, so you might find that even though you might see the green padlock in your browser it's still blocking some of the content.
Title: Re: Converting to https, step-by-step...
Post by: 青山 素子 on July 09, 2017, 10:17:42 PM
Some more useful links:


One thing to keep in mind with the image proxy is that it will increase your bandwidth as it has to fetch the insecure image and then provide it securely from your site. It shouldn't be a lot of extra traffic, but keep it in mind if you enable it.
Title: Re: Converting to https, step-by-step...
Post by: shawnb61 on July 22, 2017, 03:12:02 AM
Another utility while we're at it:
https://github.com/sbulen/sjrbTools/blob/master/SMF_SSL_Diag.php

This is an inquiry-only utility that performs simple checks for the existence of a cert, the existence of a redirect, and also dumps the various SMF variables associated with SSL.  Works for 2.0 & 2.1.  To use, just plunk it in your forum home directory (where settings.php is) and execute it. 
Title: Re: Converting to https, step-by-step...
Post by: brynn on July 27, 2017, 06:54:34 AM
Thanks for this little guide.

A few months ago my host switched all his servers to https, but didn't tell me to do anything except change the IP address.  A few weeks ago I moved to a new host.  And it was only inspecting my site after the move, when I realized I'm now in a position of having mixed http and https contents.  Even though I've had my SMF with Tiny Portal for 4 years, I'm still kind of a newbie at running a website.

For #5, I'm not installing 2.1 right now.  But I guess I will eventually.  Do I need to remember to check Force SSL option?

For #8, I thought the purpose for running the repair settings thing (in #6) is to change all the http instances to https.  And if it is, why would I still have mixed http/https images?  My site provides support for a graphics program, so I certainly will have mixed images.  But again, I thought repair settings was going to fix that.

After #8 it says
QuoteNOTE:  The upgrader doesn't change anything - if it finds a site http://, it leaves it http://.  If it finds a site with https://, it leaves it that way.
I'm not sure what that means.  What upgrader?

Thanks!
Title: Re: Converting to https, step-by-step...
Post by: shawnb61 on July 27, 2017, 09:48:39 AM
Re #5:   Short answer: Yes.  You need to set this new 2.1 setting that didn't exist in 2.0. 

Re #8:  Repair_settings.php helps you address SMF settings.  It does NOT, however, update the contents inside your posts.  Users can enter URLs, e.g., for images, inside posts.  Post content is probably the cause of mixed content warnings/issues.

This is why SMF added the image proxy - to address mixed content issues caused by links to images within posts.

Re the upgrader:  This note just points out that the upgrader does not modify any existing SSL-related settings. 

2.1 is still in beta, and there are some enhancement requests in the queue to make it a little smarter.  Upgrader behavior may change.


The main thing to know at the moment is that - no matter what happens - SMF makes it very easy to change / correct settings using the Admin control panel &/or repair_settings.php to fully support your desired SSL configuration.  It's safe.  The tools exist to correct issues & settings. 
Title: Re: Converting to https, step-by-step...
Post by: aegersz on July 27, 2017, 05:12:10 PM
this may be of interest. I had to make this (https://www.simplemachines.org/community/index.php?topic=550197.msg3901127#msg3901127) change to repair_settings.php
Title: Re: Converting to https, step-by-step...
Post by: brynn on August 01, 2017, 04:23:47 AM
QuoteRe #5:   Short answer: Yes.  You need to set this new 2.1 setting that didn't exist in 2.0.

Ok, I'll try and remember.

While I've been trying to digest all this info, I keep thinking I should do repair settings first, and set the redirect 2nd.  Is there some reason why you suggest making the redirect first?

Will I need to make the change suggested by aegersz, before I use repair settings?
Title: Re: Converting to https, step-by-step...
Post by: aegersz on August 01, 2017, 05:14:10 AM
i think i needed to make that change as i might have not setup my .htaccess for https yet.
Title: Re: Converting to https, step-by-step...
Post by: brynn on August 01, 2017, 08:14:00 AM
Oohh, and another question. 

I have 2 sites, 2 TLDs.  But the 2nd one lives as a separate page in the file structure on the server.  But it looks like a separate site, which I think is accomplished with a redirect.

Do I need to upload repair_settings.php separately into that directory, and use the same process separately, for that site?

And just to repeat my last question.  Does it really matter whether the htaccess redirect is done before or after using repair_settings?

Thanks again :)
Title: Re: Converting to https, step-by-step...
Post by: shawnb61 on August 01, 2017, 11:16:01 AM
Quote from: brynn on August 01, 2017, 08:14:00 AM
Do I need to upload repair_settings.php separately into that directory, and use the same process separately, for that site?

Yes, you run it once per site.  Yes, you put it into each forum's root directory.  From the 2.0 repair_setting.php link provided above (https://wiki.simplemachines.org/smf/Repair_settings.php):

"Upload the file repair_settings.php with an FTP client to the root directory of your forum (where Settings.php can be found)."

Quote from: brynn on August 01, 2017, 08:14:00 AM
Does it really matter whether the htaccess redirect is done before or after using repair_settings?

If you do it all in one sitting, not a lot of difference.  But I put the redirect early in the process for two reasons:
(1) Remember, people can still type in http:// in their URLs.  Without the redirect, the content will still be served up http://.  Also remember that lots of posts may have links to other posts, that are still http://.  A good redirect will clean up ALL of these loose ends. 

(2) Most of the SMF utilities, the Installer, the Upgrader & even repair_settings.php, operate from how they are invoked.  If you invoke repair_settings.php as http://, its recommendations will be http://.   If you invoke it with https://,  its recommendations will be https://.

The sooner your redirect is in operation, the sooner ALL updates will use https://.  Even if you forget to type in https://.

If you have a redirect active, or, if you invoke repair_setting.php via https://, I don't think you need aegersz's code fix.  Everything will be https:// already. 
Title: Re: Converting to https, step-by-step...
Post by: brynn on August 01, 2017, 12:04:00 PM
Oh, thank you SO much!
Title: Re: Converting to https, step-by-step...
Post by: brynn on August 03, 2017, 01:32:50 PM
I've noticed some images loading slowly, since I've made these changes.  Specifically, images in signature take several more seconds to load, after the rest of the page loads.

Could this be related to the image proxy?  Is there a way to fix it?

Thanks :)
Title: Re: Converting to https, step-by-step...
Post by: brynn on August 03, 2017, 03:33:55 PM
Changing http to https for the profile image solved it!

Now a different issue.  I have 2 sites using SMF forum/portals.  One of them doesn't have the image proxy option.  Or at least, it's not where the option for the other forum is, and I can't seem to find it.

They do use different themes, but it doesn't seem like a theme issue (or else the options would be in the theme options.

Or maybe the image proxy is provided by a mod that I don't have installed in one of them?
Title: Re: Converting to https, step-by-step...
Post by: Illori on August 03, 2017, 03:46:02 PM
do you have 2.0.14 installed on both of them?
Title: Re: Converting to https, step-by-step...
Post by: brynn on August 04, 2017, 06:05:16 PM
Ah, thanks Illori.  I just realized that, and was coming to post.  I'll upgrade asap.
Title: Re: Converting to https, step-by-step...
Post by: Matthew-me on August 20, 2017, 10:23:27 AM
Thank you for documenting this shawnb61. Used it to do a clean install on moving host. All worked. I didn't run repair settings .. just updated Avatar, Attachment, Theme and Smileys URL's manually after importing database. I think that was all.

Kudos. Worked like a dream.
Title: Re: Converting to https, step-by-step...
Post by: aegersz on August 22, 2017, 04:36:59 PM
Quote from: brynn on August 04, 2017, 06:05:16 PM
Ah, thanks Illori.  I just realized that, and was coming to post.  I'll upgrade asap.

I will upgrade too as prior to 0.14, any linked images that are not https will disable SSL for that particular page - is that correct ?
Title: Re: Converting to https, step-by-step...
Post by: Matthew-me on August 23, 2017, 08:53:48 AM
Quote from: aegersz on August 22, 2017, 04:36:59 PM
I will upgrade too as prior to 0.14, any linked images that are not https will disable SSL for that particular page - is that correct ?

2.014 includes a port from the Beta 2.1 of the image proxy option and https for Avatars.

Quote from: Colin on May 14, 2017, 05:16:14 PM
Simple Machines Forum has released a new patch to the 2.0.x line, bringing our latest release version to 2.0.14.
...
The quick summary of changes is as follows:

       
  • Added PHP 7 support.
  • Ported image proxy support from SMF 2.1.
  • Also added HTTPS for avatars.
  • Accept email addresses with long TLDs.
  • See the changelog (http://download.simplemachines.org/index.php?thanks;filename=smf_2-0-14_changelog.txt) for more.

Without upgrading pages will still load over SSL but you won't see the green padlock if there is mixed content, or you may get a warning or refusal to load - depending on browser and configuration. Upgrading to 2.014 would be my personal recommendation. Having just done a fresh install on a new server, everything is working great with SSL across the whole site.

Kindly,

M
Title: Re: Converting to https, step-by-step...
Post by: vbgamer45 on August 23, 2017, 09:21:21 PM
I would also recommend http2 with apache. Easy to setup on apache 2.4
You get a nice speed boost for ssl sites
httpd.conf file
add
LoadModule http2_module modules/mod_http2.so


And in each virtual host that has SSL
Protocols h2 http/1.1
Title: Re: Converting to https, step-by-step...
Post by: aegersz on August 27, 2017, 06:08:18 AM
I just moved to 2.0.14 and am very happy. everything is working well. image proxy is a cool thing.
Title: Re: Converting to https, step-by-step...
Post by: seosefi on September 06, 2017, 03:23:45 AM
I've spent like 10 days to convert to https, it's really hard to switch. Thank you for completing the process by looking at the makalen. It's been good to fix it. For those who want to switch to https, there will also be a small recommendation, the webmaster search console needs to set the property as https, and the robots.txt file needs to be modified as https in the site map path.
Title: Re: Converting to https, step-by-step...
Post by: Kindred on September 06, 2017, 04:14:11 PM
Sorry, but that last post made no sens at all....
Title: Re: Converting to https, step-by-step...
Post by: shawnb61 on September 06, 2017, 09:39:24 PM
I believe seosefi is saying that if we use them, we may need to also update our URLs in Google Webmaster Tools and Bing Webmaster Tools (for Bing & Yahoo) 

Also that if you have a SITEMAP: specified in your robots.txt, don't forget that, too. 

These make sense to me.   Easy to forget that stuff. 

I think the makalen reference is a typo(???).  The only connection my brain made was to Macallen scotch, which I agree is a critical part of successfully completing the process. 
Title: Re: Converting to https, step-by-step...
Post by: peterinwa on October 10, 2017, 10:49:03 PM
All my websites have been working fine after being converted with a .htaccess file, all showing the lock and secure. Until today.

Now they all work fine except for my forum which is in the folder /forums in my /public_html directory. It is showing NOT SECURE in multiple browsers.

What I don't understand is how it is possible that all my other websites, whose index.html files are found in other folders in my /public_html directory, are running fine and secure.

Any ideas what might be causing this?

Thank you,

Peter
Title: Re: Converting to https, step-by-step...
Post by: 青山 素子 on October 10, 2017, 11:06:11 PM
Is it specifically loading over http? If it's using https, you probably have an issue with mixed mode content. You can put a URL in the form over at https://www.whynopadlock.com/ and it will tell you what's loading insecurely.
Title: Re: Converting to https, step-by-step...
Post by: peterinwa on October 10, 2017, 11:16:18 PM
I used the link and all my other sites test fine, except for some insecure links to other websites. There are a good number in the forum. Could they cause the NOT SECURE issue?

They look like this:

Total number of items: 71
Number of insecure items: 5
Insecure URL: http://i990.photobucket.com/albums/af29/liz-wills/91daa7b807d8f9a426656dd94b924b9c_zpsff5vopcw.jpg
Found in: https://www.myschnauzer.net/forums/index.php?PHPSESSID=ho5bpq6s5cjpq17o22pl6la613;wwwRedirect

The forum test gave me:

SSL verification issue (Possibly mis-matched URL or bad intermediate cert.). Details:
ERROR: no certificate subject alternative name matches

This means nothing to me. I also don't know why it happens in the SMF folder and not the others. They would all operate under the same SSL.

Thank you very much!
Title: Re: Converting to https, step-by-step...
Post by: Kindred on October 10, 2017, 11:25:14 PM
Not really Anything you can do about those
Title: Re: Converting to https, step-by-step...
Post by: peterinwa on October 10, 2017, 11:30:00 PM
Do you think those items are causing the forum to show not secure? Would they cause this?

SSL verification issue (Possibly mis-matched URL or bad intermediate cert.). Details:
ERROR: no certificate subject alternative name matches

I think maybe this started today because the browsers just started checking for secure sites?
Title: Re: Converting to https, step-by-step...
Post by: Kindred on October 10, 2017, 11:53:26 PM
1- they will cause mixed content...   turning on the proxy in the forum settings will help, but may not fix. Broken photobucket links

2- no, that error is something else. Talk to your host

3- actually most browsers did this a few months ago
Title: Re: Converting to https, step-by-step...
Post by: peterinwa on October 10, 2017, 11:56:18 PM
Thank you.
Title: Re: Converting to https, step-by-step...
Post by: Sacha on October 11, 2017, 08:31:42 AM
If i have Rewrite enabled in .htacces, some users receive the following error. I had to disable it in .htaccess file:



Quote
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# Errors!
ErrorDocument 400 //index.php?action=httperror;c=400
ErrorDocument 401 //index.php?action=httperror;c=401
ErrorDocument 402 //index.php?action=httperror;c=402
ErrorDocument 403 //index.php?action=httperror;c=403
ErrorDocument 404 //index.php?action=httperror;c=404
ErrorDocument 405 //index.php?action=httperror;c=405
ErrorDocument 406 //index.php?action=httperror;c=406
ErrorDocument 407 //index.php?action=httperror;c=407
ErrorDocument 408 //index.php?action=httperror;c=408
ErrorDocument 409 //index.php?action=httperror;c=409
ErrorDocument 410 //index.php?action=httperror;c=410
ErrorDocument 411 //index.php?action=httperror;c=411
ErrorDocument 412 //index.php?action=httperror;c=412
ErrorDocument 413 //index.php?action=httperror;c=413
ErrorDocument 414 //index.php?action=httperror;c=414
ErrorDocument 415 //index.php?action=httperror;c=415
ErrorDocument 416 //index.php?action=httperror;c=416
ErrorDocument 417 //index.php?action=httperror;c=417
ErrorDocument 500 //index.php?action=httperror;c=500
ErrorDocument 501 //index.php?action=httperror;c=501
ErrorDocument 502 //index.php?action=httperror;c=502
ErrorDocument 503 //index.php?action=httperror;c=503
ErrorDocument 504 //index.php?action=httperror;c=504
ErrorDocument 505 //index.php?action=httperror;c=505

I think the problem is "RewriteEngine On" because i deleted lines of https and .htaccess was like this and the continued:

Quote
RewriteEngine On

# Errors!
ErrorDocument 400 //index.php?action=httperror;c=400
ErrorDocument 401 //index.php?action=httperror;c=401
ErrorDocument 402 //index.php?action=httperror;c=402
ErrorDocument 403 //index.php?action=httperror;c=403
ErrorDocument 404 //index.php?action=httperror;c=404
ErrorDocument 405 //index.php?action=httperror;c=405
ErrorDocument 406 //index.php?action=httperror;c=406
ErrorDocument 407 //index.php?action=httperror;c=407
ErrorDocument 408 //index.php?action=httperror;c=408
ErrorDocument 409 //index.php?action=httperror;c=409
ErrorDocument 410 //index.php?action=httperror;c=410
ErrorDocument 411 //index.php?action=httperror;c=411
ErrorDocument 412 //index.php?action=httperror;c=412
ErrorDocument 413 //index.php?action=httperror;c=413
ErrorDocument 414 //index.php?action=httperror;c=414
ErrorDocument 415 //index.php?action=httperror;c=415
ErrorDocument 416 //index.php?action=httperror;c=416
ErrorDocument 417 //index.php?action=httperror;c=417
ErrorDocument 500 //index.php?action=httperror;c=500
ErrorDocument 501 //index.php?action=httperror;c=501
ErrorDocument 502 //index.php?action=httperror;c=502
ErrorDocument 503 //index.php?action=httperror;c=503
ErrorDocument 504 //index.php?action=httperror;c=504
ErrorDocument 505 //index.php?action=httperror;c=505

Then i deleted "RewriteEngine On" and worked fine:

Quote
# Errors!
ErrorDocument 400 //index.php?action=httperror;c=400
ErrorDocument 401 //index.php?action=httperror;c=401
ErrorDocument 402 //index.php?action=httperror;c=402
ErrorDocument 403 //index.php?action=httperror;c=403
ErrorDocument 404 //index.php?action=httperror;c=404
ErrorDocument 405 //index.php?action=httperror;c=405
ErrorDocument 406 //index.php?action=httperror;c=406
ErrorDocument 407 //index.php?action=httperror;c=407
ErrorDocument 408 //index.php?action=httperror;c=408
ErrorDocument 409 //index.php?action=httperror;c=409
ErrorDocument 410 //index.php?action=httperror;c=410
ErrorDocument 411 //index.php?action=httperror;c=411
ErrorDocument 412 //index.php?action=httperror;c=412
ErrorDocument 413 //index.php?action=httperror;c=413
ErrorDocument 414 //index.php?action=httperror;c=414
ErrorDocument 415 //index.php?action=httperror;c=415
ErrorDocument 416 //index.php?action=httperror;c=416
ErrorDocument 417 //index.php?action=httperror;c=417
ErrorDocument 500 //index.php?action=httperror;c=500
ErrorDocument 501 //index.php?action=httperror;c=501
ErrorDocument 502 //index.php?action=httperror;c=502
ErrorDocument 503 //index.php?action=httperror;c=503
ErrorDocument 504 //index.php?action=httperror;c=504
ErrorDocument 505 //index.php?action=httperror;c=505
Title: Re: Converting to https, step-by-step...
Post by: humbleworld on December 26, 2017, 09:36:03 PM
my forum, by default, has no www, and it is installed on a subdomain.

i tried this .htaccess file before but it was in conflict with prettyURL mod. How to fix it?
Title: Re: Converting to https, step-by-step...
Post by: shawnb61 on December 27, 2017, 09:41:12 AM
I think you're going to need to ask a few questions in the Pretty URLs support thread for a problem specific to that mod.   I see you asked once - be persistent.
Title: Re: Converting to https, step-by-step...
Post by: Somegras on December 29, 2017, 02:34:26 PM
Followed this guide, https:// works but Google indicates that it is still not fully function (the green lock with info). How can I fix this?



Title: Re: Converting to https, step-by-step...
Post by: lurkalot on December 29, 2017, 02:54:16 PM
Quote from: Somegras on December 29, 2017, 02:34:26 PM
Followed this guide, https:// works but Google indicates that it is still not fully function (the green lock with info). How can I fix this?



The address for your logo image at the bottom of the page

http://xsfserver.com/footerlogo.png

Change to

https://xsfserver.com/footerlogo.png
Title: Re: Converting to https, step-by-step...
Post by: Somegras on December 29, 2017, 03:06:48 PM
Quote from: lurkalot on December 29, 2017, 02:54:16 PM
Quote from: Somegras on December 29, 2017, 02:34:26 PM
Followed this guide, https:// works but Google indicates that it is still not fully function (the green lock with info). How can I fix this?



The address for your logo image at the bottom of the page

http://xsfserver.com/footerlogo.png

Change to

https://xsfserver.com/footerlogo.png

Done, seems to have fixed everything for guests at the board index, however, when I am being logged in, it isn't functioning at the board index. If I go deeper in posts it sometimes works and sometimes doesn't.
Title: Re: Converting to https, step-by-step...
Post by: mrsfalcon on January 03, 2018, 12:24:36 PM
Thanks for this! Switched to https a while back but just forced it this am along with some other upgrades to improve safety and performance. I had some unhappy users but fixed the problem quickly with your instructions!
Title: Re: Converting to https, step-by-step...
Post by: Obsydian on February 05, 2018, 10:44:54 AM
My forum at https://www.thetarotforum.com/ is showing up as not-secure.  The test website shows: You currently have TLSv1 enabled.
This version of TLS is being phased out. This warning won't break your padlock, however if you run an eCommerce site, PCI requirements state that TLSv1 must be disabled by June 30, 2018.

That is the only issue on that page, and it says it won't break the padlock, but I'm not sure what else is broken?

EDIT: I closed the tab and reopened it and everything is secure and working fine.  Keeping this with solution in case somebody else needs it. :)
Title: Re: Converting to https, step-by-step...
Post by: Nomada_Firefox on February 12, 2018, 06:47:03 AM
Hi. I do not know but my forum 2.0.15 + Tiny portal 1.3 loads the https as secure running administration and perhaps other parts but when I run the forum or the main page, it shows the https but it says how the site is not fully secured.

It looks as if my server was correct. https://www.sslshopper.com/ssl-checker.html#hostname=https://firefoxccmods.com

Any idea about why does it happen?
Title: Re: Converting to https, step-by-step...
Post by: lurkalot on February 13, 2018, 02:27:05 PM
Quote from: Nomada_Firefox on February 12, 2018, 06:47:03 AM
Hi. I do not know but my forum 2.0.15 + Tiny portal 1.3 loads the https as secure running administration and perhaps other parts but when I run the forum or the main page, it shows the https but it says how the site is not fully secured.

It looks as if my server was correct. https://www.sslshopper.com/ssl-checker.html#hostname=https://firefoxccmods.com

Any idea about why does it happen?

Hard to tell when you can't see the home page or forum as guest.
Title: Re: Converting to https, step-by-step...
Post by: helpplease on February 13, 2018, 09:09:09 PM
Hi all  :)


I have also need so long time to get https half way working, but still need help.

Themes/Reseller/images/expand.gif caused mixed-content and the https SSL-Icon is not green. Yes, only because this small gif is loaded.

The source code show: srcCollapsed: smf_images_url + '/expand.gif',
Have try to delete this from the BoardIndex.template.php "srcCollapsed: smf_images_url + '/expand.gif'," but than the index-page, forum is down.

So, how can I get rid of this?  :(

Any help would be greatly appreciated..

Title: Re: Converting to https, step-by-step...
Post by: Kindred on February 13, 2018, 09:15:58 PM
Theme specific issues should be addressed in the thread dedicated to supporting that theme.
Title: Re: Converting to https, step-by-step...
Post by: helpplease on February 13, 2018, 10:03:01 PM
Hello Kindred, thank you for your response.

The Reseller is based on the default template from smf Forum  :)
The same code is on this website: simplemachines.org/index.php
aSwapImages: [
            {
               sId: 'upshrink_ic',
               srcExpanded: smf_images_url + '/collapse.gif',
               altExpanded: 'Shrink or expand the header.',
               srcCollapsed: smf_images_url + '/expand.gif',
               altCollapsed: 'Shrink or expand the header.'
            }
         ],
         oThemeOptions: {


Just need to know the path to change it to https. I didn't find it :(
Somewhere in the code for SMF it tell the script to take the /expand.gif, but where is it?
The developer of SMF know for sure where the string is located..
Title: Re: Converting to https, step-by-step...
Post by: Illori on February 14, 2018, 05:09:24 AM
if you reset all theme URLs to be https it should be converted automatically. if you did that already and still have this issue you need to post in themes support topic.
Title: Re: Converting to https, step-by-step...
Post by: helpplease on February 14, 2018, 07:10:50 AM
This hasen't been converted automatically.

However, I don't want to "spam" the forum here with this question but I still need help.
Title: Re: Converting to https, step-by-step...
Post by: helpplease on February 14, 2018, 08:34:25 AM
Your webserver is forcing the use of SSL.

Your SSL Certificate is installed correctly.


Mixed Content - Errors:

An image with an insecure url of "http://.........../expand.gif" was loaded on line: 749.
This URL will need to be updated to use a secure URL for your padlock to return.
Title: Re: Converting to https, step-by-step...
Post by: Illori on February 14, 2018, 08:37:59 AM
i understand that is your issue, as has been stated already in this topic you need to post in the themes support topic for further assistance.
Title: Re: Converting to https, step-by-step...
Post by: helpplease on February 14, 2018, 09:07:16 AM
I need a general themes support, the same error comes when I change to the default SMF themes.

And where is it please?
Title: Re: Converting to https, step-by-step...
Post by: Vincenz0 on March 14, 2018, 05:36:07 AM
Hey guys!

I wish to leave another tip of information.

After switching to https, naturally many things stopped to work especially images (mixed content.. ;) )

The image proxy SMF provided was not working for me, and returning error 500, but nothing in php logs and I had no clue what was wrong, I checked everything, turned on apache2 logging for all errors, even turned on display errors but no still nothing to see..

Turns out in the proxy.php file errors get disabled..... :D
                // Turn off all error reporting; any extra junk makes for an invalid image.
                error_reporting(0);


After commenting out that line I found out the simple problem and if others have it, I recommend this fix.

Turns out it uses the CURL apache module.. which is not standard installed on apache2.

Simple fix:
sudo apt-get install php-curl

Hope it helps someone with image proxy problems.


Also the redirect was not working, not in apache2 config files or in .htaccess.. turns out in the new apache it is not recommended to make a rewrite for redirects.

instead do the folowing:
In your /etc/apache2/sites-enabled/
Modify your site config something like this:

<VirtualHost *:80>
    ServerName www.yourforumsite.com
    Redirect permanent "/" "https://www.yourforumsite.com/"
</VirtualHost>

<VirtualHost *:443>
    ServerName www.yourforumsite.com
    # ... SSL configuration goes here
</VirtualHost>

This is always working and more safe than any rewrites.


Because of my rewrite problems I was already manually updating http to https a simple trick to update all old URL's for your site people posted or used in signatures:

UPDATE smf_messages
     set body = REPLACE(body, 'http://www.yourforumsite.com', 'https://www.yourforumsite.com')
     WHERE body like '%http://www.yourforumsite.com%';

UPDATE smf_members
     set signature = REPLACE(signature, 'http://www.yourforumsite.com', 'https://www.yourforumsite.com')
     WHERE signature like '%http://www.yourforumsite.com%';


This can also be used to update for instance images posted with http://i.imgurl to https.
And thus avoid caching images on your server when not needed. Most image hosts support https nowadays (some exceptions like tinypic)
Title: Re: Converting to https, step-by-step...
Post by: MadCityKaren on May 20, 2018, 02:45:16 PM
Thanks for this step-by-step list, shawnb61! 

I'd realized my forum/website was having an issue of some sort with SSL after receiving some feedback from a member, but found the problem wasn't so much not having the certificate (SSL checker showed all was well), but that the .htaccess file in order to redirect is somehow missing ... (trusting that will indeed solve the issue; I'm asking the webhost to deal with it -- it's not as though I'd removed the file; they should be apprised of such things to maintain the integrity of all they serve.) 
Title: Re: Converting to https, step-by-step...
Post by: danshell on July 01, 2018, 10:23:44 PM
I have SSL on my site working well for the most part.

Well it works everywhere except when you go into an thread. It doesnt have the green secure it just has the question mark.

Im missing a setting somewhere. I have followed this thread ok but I must be missing something simple.

ozisuzu.com.au

Any help is appreciated?

EDIT: while your replying to a post it is secure but when you just view threads your not. While your on the portal front page or forums main directory it is all secure.

EDIT again! It seems like it is only some threads that are not working hmmmm how odd. Some are secure and some are not?

EDIT for the third time.....sorry for being a pain. It appears to be only threads with images so ill work on that.
Title: Re: Converting to https, step-by-step...
Post by: Aleksi "Lex" Kilpinen on July 02, 2018, 12:22:45 AM
The image proxy in 2.0 is designed to fix that, though it is not yet a perfect solution and is going to see improvements in a later release if I have understood correctly.
Title: Re: Converting to https, step-by-step...
Post by: GigaWatt on July 02, 2018, 09:33:59 AM
Quote from: danshell on July 01, 2018, 10:23:44 PM
EDIT: while your replying to a post it is secure but when you just view threads your not. While your on the portal front page or forums main directory it is all secure.

EDIT again! It seems like it is only some threads that are not working hmmmm how odd. Some are secure and some are not?

EDIT for the third time.....sorry for being a pain. It appears to be only threads with images so ill work on that.

Those images probably load through http, not https and that's why there is an unlocked keypad (I presume) in the place where the locked keypad should be. It means that some elements don't load through https, but http.

Here's a test you could try. Open a new thread, insert a https and a http image link in it (with the image tag). Save (post) the thread and see if the keypad is showing an exclamation mark or if it's unlocked. If it is, try removing the http image from the post and see if the exclamation mark (or unlocked keypad) is removed (the keypad stays locked).
Title: Re: Converting to https, step-by-step...
Post by: danshell on July 02, 2018, 08:49:27 PM
Yes it was because of images using http.

I seem to have solved it with image proxy. All pages are now running green and secure.

Thanks for the help.
Title: Re: Converting to https, step-by-step...
Post by: diegolyanky on July 17, 2018, 07:53:54 AM
So... What's about repair_settings.php for 1.1.xx versions ? ...

I'm running 1.1.21 and I can't find the correct one.

Thanks Folks !!
Title: Re: Converting to https, step-by-step...
Post by: Illori on July 17, 2018, 07:59:38 AM
if you are using SMF 1.1.* you need to upgrade to SMF 2.0 to get support for https fully. not to mention that SMF 1.1 is no longer getting security patches.
Title: Re: Converting to https, step-by-step...
Post by: diegolyanky on July 17, 2018, 08:26:44 AM
Quote from: Illori on July 17, 2018, 07:59:38 AM
if you are using SMF 1.1.* you need to upgrade to SMF 2.0 to get support for https fully. not to mention that SMF 1.1 is no longer getting security patches.

Any tool or patch to do that ? ...

I searched but can't find it
Title: Re: Converting to https, step-by-step...
Post by: Arantor on July 17, 2018, 08:31:20 AM
Upgrading SMF (https://wiki.simplemachines.org/smf/Upgrading)
Title: Re: Converting to https, step-by-step...
Post by: diegolyanky on July 17, 2018, 09:33:34 AM
Thanks !
Title: Re: Converting to https, step-by-step...
Post by: Veee on July 30, 2018, 07:06:22 AM
Thank you so much for this! I finally had the time to do this to my forum and everything is working just fine. :D
Title: Re: Converting to https, step-by-step...
Post by: MensaMod on September 18, 2018, 12:46:12 PM
Many thanks to all for the OP and subsequent postings. 
The transition went smoothly and seems to be successful. 
Couldn't have done it without y'all.
Title: Re: Converting to https, step-by-step...
Post by: simplebeer on October 26, 2018, 04:54:07 AM
I followed every step but cant get it right, if i rightclick image or smiley i see a secure page, but the main isn't secure.

www.lasforum.nl

Is it possible the problem is in the footer? The link to SMF, Simple Audio Video Embedder and XHTML ?
In which php can i find this?
Title: Re: Converting to https, step-by-step...
Post by: LiroyvH on October 26, 2018, 05:06:48 AM
Quote from: simplebeer on October 26, 2018, 04:54:07 AM
I followed every step but cant get it right, if i rightclick image or smiley i see a secure page, but the main isn't secure.

www.lasforum.nl

Is it possible the problem is in the footer? The link to SMF, Simple Audio Video Embedder and XHTML ?
In which php can i find this?

https://www.whynopadlock.com/results/43865fe0-8763-44e1-b4dc-67a7005bd49b
Quote
An image with an insecure url of "http://www.lasforum.nl/afbeeldingenvast/lasforumbanner2.png" was loaded on line: 69 of https://www.lasforum.nl/.
Title: Re: Converting to https, step-by-step...
Post by: simplebeer on October 26, 2018, 05:15:15 AM
Thanks, but if I right click on it it looks secure?

https://www.lasforum.nl/afbeeldingenvast/lasforumbanner2.png


EDIT: it works! I change the logo URL on theme settings

Thanks so much @CoreISP!
Title: Re: Converting to https, step-by-step...
Post by: Lostmykey on January 01, 2019, 04:27:57 PM
Hi, Happy New Year! Question about Image Proxy and https...

We are running 2.0.15 -Exodus Theme - and converted successfully last week to https.

Member avatars with links are causing some mixed content warnings in threads. They are soft warnings but I'd like to get rid of them.

Will turning on Image Proxy fix the issues with http: Urls for member image avatars? If so, does it work immediately?

Would it be better to just globally turn off urls for member avatars and force them to upload images or use the forums avatars?





Title: Re: Converting to https, step-by-step...
Post by: vbgamer45 on January 01, 2019, 04:36:26 PM
Yes it will help give it a try.
Title: Re: Converting to https, step-by-step...
Post by: Lostmykey on January 03, 2019, 11:13:59 AM
Quote from: vbgamer45 on January 01, 2019, 04:36:26 PM
Yes it will help give it a try.

Thanks, that did the trick. We lost all avatars on URLs but it's no big loss there - and now we've got the green padlock on all threads that I've spot checked.
Title: Re: Converting to https, step-by-step...
Post by: drewactual on January 03, 2019, 02:09:22 PM
do this, as well, if you haven't already.  http://www.simplemachines.org/community/index.php?topic=197938.0 ...... can also assist with the SSL issue..
Title: Re: Converting to https, step-by-step...
Post by: Raths Rants on January 16, 2019, 07:03:31 AM
THANK YOU!

I just recently switched host providers and added SSL. My Wordpress site converted just fine but, my SMF site needed some love.

After messing with it a day or so I took a DEEP breath and put it down.

I decided to wake up before the family this morning and search for a solution.

After a bit of searching I came across your post. I put my reading cap on and followed the instructions step by step.

Worked like a charm. Site is back up and running in less than 30 minutes!
Title: Re: Converting to https, step-by-step...
Post by: luuuciano on January 26, 2019, 08:20:13 PM
Someone uses google ads on a smf forum?

Because for some odd reason the google ads script is calling the non ssl version, instead the https version... it is odd because all has changed in the smf config to work ok with https....
I have no idea what is going on..... any idea?

This is the error Firefox console shows me:
"Blocked loading mixed active content "http://pagead2.googlesyndication.com/pagead/show_ads.js""

And chrome says:
"Mixed Content: The page at 'https://cbabikes.com.ar/el-bar/compra-bicicletas-en-uruguay-2015-12628.0.html' was loaded over HTTPS, but requested an insecure script 'http://pagead2.googlesyndication.com/pagead/show_ads.js'. This request has been blocked; the content must be served over HTTPS."

So... it is not showing any ads at all :-\

here an example post https://cbabikes.com.ar/el-bar/compra-bicicletas-en-uruguay-2015-12628.0.html

I have used several ssl checker online... but only says that I have to contact google to fix it (??)

Maybe it is some google ads setup? do I have to change all my codes/google ads setup to use https ?

?
Title: Re: Converting to https, step-by-step...
Post by: vbgamer45 on January 26, 2019, 08:26:09 PM
You have to get the newest google adsense block code. You are using the old format.
Title: Re: Converting to https, step-by-step...
Post by: luuuciano on January 27, 2019, 08:31:37 PM
Quote from: vbgamer45 on January 26, 2019, 08:26:09 PM
You have to get the newest google adsense block code. You are using the old format.

Mmmmm, I have checked and it seems to be the new one..... I have been reading about this, and there is a lot of people talking about a huge drop on ads and saying that there is no too much SSL ads, so google adsense tries to serve regular ads... but it is blocked... so, only a few ssl ads are served ¿?
Title: Re: Converting to https, step-by-step...
Post by: vbgamer45 on January 27, 2019, 09:03:09 PM
That's not really the case any more since the entire web is mostly on SSL.
Title: Re: Converting to https, step-by-step...
Post by: mcpheex3 on January 29, 2019, 07:09:36 PM
I need help. I may be beyond help, in which case I need the names of consultants I can hire.  ;D

I freely admit I barely know what I am doing when it comes to admin'ing a forum. I can't get this SSL thing straightened out.

1. I think the .htaccess file should go in the theflourishforum.com/forum directory because that is where the settings file is? Is that correct? Or should it go in theflourishforum.com?

2. So basic but ... how do I create the .htaccess file? When I try to save it in notepad or wordpad, it forces a .rtf or .txt extension which can't be deleted.

3. Does it matter the site goes through cloudflare? I can't even remember what that means except I set it up when we were using the chat feature and I was blowing up my server. I have since deleted chat.

4. When I test it on whynopadlock, the SSL connection passes, valid certificate, installed correctly. But I get, "Your webserver is forcing the use of SSL." Is that because of cloudfare? Should I get rid of cloudflare?

5. Protocols, I get this: You currently have TLSv1 enabled.
This version of TLS is being phased out. This warning won't break your padlock, however if you run an eCommerce site, PCI requirements state that TLSv1 must be disabled by June 30, 2018. Say what?

6. I then get 5 hard failures, 8 soft failures, and 2 form failures.

I have been trying to address this for months but every time I try, I get so overwhelmed, I give up. Also, I have a huge FAQ on the main URL which directs to various topics in the forum. This is an integral part of my site and none of the links will work because of this.

Any help is very much appreciated.
Title: Re: Converting to https, step-by-step...
Post by: drewactual on January 29, 2019, 07:29:19 PM
Quote from: mcpheex3 on January 29, 2019, 07:09:36 PM
I need help. I may be beyond help, in which case I need the names of consultants I can hire.  ;D

I freely admit I barely know what I am doing when it comes to admin'ing a forum. I can't get this SSL thing straightened out.

1. I think the .htaccess file should go in the theflourishforum.com/forum directory because that is where the settings file is? Is that correct? Or should it go in theflourishforum.com?
yes- it should go in the directory with your forum, but MAKE SURE your server looks however layers deep for htaccess files- some can be configured not to.. so... ask your host

2. So basic but ... how do I create the .htaccess file? When I try to save it in notepad or wordpad, it forces a .rtf or .txt extension which can't be deleted.
write it in notepad and upload it to your server, THEN change the name to .htaccess from htacces.txt

3. Does it matter the site goes through cloudflare? I can't even remember what that means except I set it up when we were using the chat feature and I was blowing up my server. I have since deleted chat.
doesn't matter

4. When I test it on whynopadlock, the SSL connection passes, valid certificate, installed correctly. But I get, "Your webserver is forcing the use of SSL." Is that because of cloudfare? Should I get rid of cloudflare?
something in the configuration, either an htaccess or http.d file above your layer is likely forcing.... not a bad thing, but ask your host

5. Protocols, I get this: You currently have TLSv1 enabled.
This version of TLS is being phased out. This warning won't break your padlock, however if you run an eCommerce site, PCI requirements state that TLSv1 must be disabled by June 30, 2018. Say what?
tell your host to update you to the better protocols... if you need a list, I can get it for you

6. I then get 5 hard failures, 8 soft failures, and 2 form failures.
what kind of failures and using what kind of evaluation?
I have been trying to address this for months but every time I try, I get so overwhelmed, I give up. Also, I have a huge FAQ on the main URL which directs to various topics in the forum. This is an integral part of my site and none of the links will work because of this.

Any help is very much appreciated.

for your SSL Cipher Suite, you'll be best served with the following configuration (pass to your host) :

ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA256

your SSL protocols are best configured with (pass to your host) :

All -SSLv2 -SSLv3
Title: Re: Converting to https, step-by-step...
Post by: drewactual on January 29, 2019, 07:43:48 PM
by the way @mcpheex3, let's take your problem to its own thread where folks can better serve you. 
Title: Re: Converting to https, step-by-step...
Post by: mcpheex3 on February 04, 2019, 09:17:59 AM
Thank you very much @drewactual! I am going to try the information you provided and if I still can't get it to work, will start a new thread. Your response is very much appreciated!
Title: Re: Converting to https, step-by-step...
Post by: zakallin69 on June 10, 2019, 05:40:19 AM
First, i'm sorry if this is in wrong place but hopefully someone can help....and my native language is finnish so my english could be some kind of poor  ::)

I'm admin in forum (2.0.15) and everything is working fine until i tried to get ads manager to work.
Talked to developer and he checked it and said it's some problem with hosting.
So i contact them and answer was there's problem with http-redirecting.....
I made new .htaccess-file and tested it and it went ok. Next i ran repair_settings.php and no effect.
So some still some images not loading properly in forum, don't know what else i could do.
And last, i'm not any kind of coder at all so knowledge of this is not so good  :-\
Title: Re: Converting to https, step-by-step...
Post by: shawnb61 on June 10, 2019, 05:48:53 AM
Do you have the image proxy enabled?  If so, try disabling it.

This will result in the loss of a padlock under some situations (when you have an image link to an http photo) but may get you your photos back.
Title: Re: Converting to https, step-by-step...
Post by: zakallin69 on June 10, 2019, 05:55:52 AM
Quote from: shawnb61 on June 10, 2019, 05:48:53 AM
Do you have the image proxy enabled?  If so, try disabling it.

This will result in the loss of a padlock under some situations (when you have an image link to an http photo) but may get you your photos back.

Where i do that proxy thing  ???
And now only missing images are new post icons and all ad photos i try to link.
Title: Re: Converting to https, step-by-step...
Post by: shawnb61 on June 10, 2019, 06:07:43 AM
If its restricted to message icons, it's not a proxy issue.

I would double-check all image & avatar folder settings first. 

If you're having an issue with the ads manager mod, I would suggest posting in the support thread for that mod.


Title: Re: Converting to https, step-by-step...
Post by: zakallin69 on June 10, 2019, 06:12:06 AM
Quote from: shawnb61 on June 10, 2019, 06:07:43 AM
If its restricted to message icons, it's not a proxy issue.

I would double-check all image & avatar folder settings first. 

If you're having an issue with the ads manager mod, I would suggest posting in the support thread for that mod.

Thanks again for your answer.....
Yep, that ad manager is one thing but where to check those folder settings....i mean if i manage to get them right it's nice to see if it affects that mod too?
Title: Re: Converting to https, step-by-step...
Post by: zakallin69 on June 10, 2019, 07:56:36 AM
Quote from: zakallin69 on June 10, 2019, 06:12:06 AM
Quote from: shawnb61 on June 10, 2019, 06:07:43 AM
If its restricted to message icons, it's not a proxy issue.

I would double-check all image & avatar folder settings first. 

If you're having an issue with the ads manager mod, I would suggest posting in the support thread for that mod.

Thanks again for your answer.....
Yep, that ad manager is one thing but where to check those folder settings....i mean if i manage to get them right it's nice to see if it affects that mod too?

EDIT : i got this figured out and working now.......
Title: Re: Converting to https, step-by-step...
Post by: nax on June 30, 2019, 08:02:47 AM
Just for clarification that I'm going to do this correctly.....
I look after a forum hosted by G C Solutions, we are currently on SMF 2.0.15 and I want to convert to https.  We have purchased an SSL certificate ant this is installed and checked using https://www.sslshopper.com/ssl-checker.html
So to proceed I should :
1.   add in the redirect lines into the .htacess file
2.   put the site into maintenance mode
3.   upload and run repair_settings.php – do I need to run this as https://www.mysite.com/repair_settings.php ? Or is the http prefix ok?
4.   Change the following from http to https:-
- $boardurl
- Your Smileys URL
- Your Avatars URL
- Your Custom Avatars URL (if you have one)
- Your Theme URL (one for each theme!!!!)
- Your Theme/Images URL (one for each theme!!!!)

Question; this states one for each theme? I'm not sure what is meant here as although several themes are install on our forum only one bespoke based on the Curve default is used.  Do I need to pick each of the themes in turn changing their prefix to https and saving in repair_settings before ending up with my current theme location?  I'm just a little confused here.

5.   Tick the Enable Proxy Image box in the Server Settings/General page
6.   Do I need to alter the .php file where the forum logo is called, it's held locally on the server – can anyone tell me offhand which file this is that is the main page (I know I can figure it out but I'm trying to reduce the forum downtime)
7.   Run repair_settings.php again just to check all is ok
8.   Take the forum out of maintenance mode
9.   Check using tools to see if any other forum page elements are incorrectly configured
10.   Have a large gin and tonic.
Title: Re: Converting to https, step-by-step...
Post by: nax on July 03, 2019, 10:03:59 AM
Re my last post there..... I've completed the change to https: without any problems.  I didn't realise that in the repair_settings screen all themes installed in SMF are shown so I understand the instructions now (it's not often most of us would be running this), basically any line that has http in it you change to https.  If all your users use one theme odds are your forum "home page" may contain images that still use http, the file that is probably being call ed is /www/Themes/your_theme_name/index.template.php but use the tools suggested to check for mixed image content errors.
Title: Re: Converting to https, step-by-step...
Post by: willemb on September 09, 2019, 06:26:05 AM
Quote from: shawnb61 on July 08, 2017, 03:01:04 AM
(...)
Hope this helps.

It sure did, thanks! It went like a breeze for us (2.015, default theme). The only manual http -> https correction I needed was for our logo.
Title: Re: Converting to https, step-by-step...
Post by: HusaBob on November 15, 2019, 04:07:36 PM
Wow is this confusing!!

Our site is at 2.0.15. We bought a SSL Certificate last year but never knew we had to alter the site.

Frankly I don't see any real reason for the SSL....it's just a hobby BBoard. We're not participating in Swiss banking or anything.
Title: Re: Converting to https, step-by-step...
Post by: Arantor on November 15, 2019, 04:28:16 PM
The SSL is because a) browsers will tell your users your site is insecure without it, b) they're now free with Let's Encrypt, c) on the presumption that your members reuse passwords between your site and other sites, without SSL their passwords could be seen by anyone on the same network, great if you're using say 4G...
Title: Re: Converting to https, step-by-step...
Post by: laurent629 on December 15, 2019, 09:53:53 AM
Bonjour,

Pour celui ou celle qui n'y connaît rien en informatique vos solutions sont inefficaces. Comme d'habitude les membres des forum spécialisés pensent toujours s'adresser à des gens qui maîtrise. Concernant le fait de passer de http à https, je viens confirmer que c'est beaucoup trop compliqué pour des personnes comme moi et ça ne marche jamais.

J'ai bien installé les certificats SSL mais c'est loin de suffire. Un certain nombre d'erreurs subsistent et j'ai abandonné.Problèmes d'adresses IP dynamiques, problèmes d'ancien logo, problèmes "d'auto hébergé"partout. Mes certificats Let'Encrypt bien en place me font bien rire (jaune).

A se demander si l'administration d'un forum tel que SMF ou autre est strictement réservé à une élite. Et encore, j'ai eu un peu de chance qu'un sympathique membre ai pu faire lui-même ma mise à jour gratuitement sur son temps à lui. Je n'oserai pas lui demander plus, il serait capable de le faire pour moi.

Vous devriez trouver une solution pour "les p'tits copains" qui sont nul en gestion de serveur. Demander une faible participation, on vous donne nos identifiants et accès et vous le faite pour nous.
Title: Re: Converting to https, step-by-step...
Post by: Kindred on December 16, 2019, 03:53:35 PM
Please post in English here ---   or ask your question in the French Language support boards. :D
Title: Re: Converting to https, step-by-step...
Post by: laurent629 on December 17, 2019, 11:39:39 AM
Ok, sorry i said :

Hello,

For those who know nothing about IT, your solutions are ineffective. As usual, members of specialized forums have always addressed people who have mastered it. Regarding the fact of going from http to https, I just confirmed that it is far too complicated for people like me and it never works.

I have installed the SSL certificates, but that is far from enough. A number of errors remain and I have given up. Dynamic IP address issues, old logo issues, "self hosted" issues everywhere. My Let'Encrypt certificates in place make me laugh (yellow).

To wonder if the administration of a forum such as SMF or other is strictly reserved for an elite. And again, I was lucky that a nice member was able to do my own free update on his own time. I would not dare ask him more, he would be able to do for me.

You should find a solution for "the little buddies" who suck in server management. Request a low participation, we give you our identifiers and access and you do it for us.
Title: Re: Converting to https, step-by-step...
Post by: Illori on December 17, 2019, 11:43:09 AM
we have a charter membership where you can donate to the project and we offer some support as a perk of that membership. some team member(s) may be able to assist you further with that request.

https://www.simplemachines.org/charter/
Title: Re: Converting to https, step-by-step...
Post by: Kindred on December 17, 2019, 10:04:43 PM
It's not that hard or elite...
I converted 4 sites to https in under 30 minutes.
Title: Re: Converting to https, step-by-step...
Post by: Aleksi "Lex" Kilpinen on December 18, 2019, 12:12:49 AM
Also, things can be made a lot easier with a proper selection of hosts, as many hosts have tools for automating a free SSL cert and related redirects on the server. After that it's just a matter of cleaning your forum settings really.
Title: Re: Converting to https, step-by-step...
Post by: laurent629 on December 18, 2019, 11:05:51 AM
Quote from: Illori on December 17, 2019, 11:43:09 AM
we have a charter membership where you can donate to the project and we offer some support as a perk of that membership. some team member(s) may be able to assist you further with that request.

https://www.simplemachines.org/charter/

So this is a very good thing. I am not the last to donate to forums.
I keep this link.
Title: Re: Converting to https, step-by-step...
Post by: HusaBob on December 23, 2019, 03:52:28 PM
Quote from: Aleksi "Lex" Kilpinen on December 18, 2019, 12:12:49 AM
Also, things can be made a lot easier with a proper selection of hosts, as many hosts have tools for automating a free SSL cert and related redirects on the server. After that it's just a matter of cleaning your forum settings really.

We use Site 5.
Title: Re: Converting to https, step-by-step...
Post by: daverj on March 14, 2020, 06:07:54 PM
I have an SMF site running 2.0.17. It's installed in mydomain.com/forum but is accessed through forum.mydomain.com

I just downloaded the repair_settings.php file from the link in one of the first couple of posts of this thread (the version for 2.0.x).

I installed it in the forum root folder (mydomain.com/forum). I then ran that page.

It showed Maintenance Mode: "Value not found" So I set it to OFF.
It showed Queryless URLs: "Value Not Found" so I set it to OFF.
It showed Database Engine: "Value not found" but had MySQL selected in the dropdown box, which is correct. So I left it alone.

I changed nothing else and hit "Save Settings".

I then opened another tab and browsed to the forum. Nothing. Blank white screen on Firefox. I opened Chrome and browsed to the forum, and it said not responding 500 error.

Luckily I had done a backup just before. I restored the home directory on the server and the forum is back.

What went wrong?
Title: Re: Converting to https, step-by-step...
Post by: shawnb61 on March 14, 2020, 06:14:50 PM
Did you run all the steps in the original post above, in order?

What happened when you ran step 2?
Title: Re: Converting to https, step-by-step...
Post by: daverj on March 14, 2020, 06:41:52 PM
The certificate is installed (autoSSL by cPanel) and works fine. I can go to the forum using https:// and it shows up, but with a grey lock and warning that there is mixed content.

I have not set up the rewrite rule yet because I wanted to resolve the issues first. And since the original poster suggested running the repair_settings.php once to fix any other issues before running it again to fix the URLs, I was doing that and hadn't changed any of the URLs yet.
Title: Re: Converting to https, step-by-step...
Post by: shawnb61 on March 14, 2020, 07:03:22 PM
Which issues were you trying to resolve first?  The mixed content?
Title: Re: Converting to https, step-by-step...
Post by: daverj on March 14, 2020, 07:09:32 PM
The goal was to find and fix the reasons for the mixed content warning before setting a rewrite rule to move to force https (since some browsers won't show a site with mixed content). I figured the mentioned URL settings could be at least part of the problem.

I ran repair_settings.php and saw the "Value Not Found" warnings mentioned above, so figured I would first change them and save the settings before coming back to change the URLs to use https. But that first pass killed the forum.
Title: Re: Converting to https, step-by-step...
Post by: shawnb61 on March 14, 2020, 08:12:34 PM
OK. 

Some questions:
- What value do you have for $db_type in settings.php right now?
- What mods do you have installed?
- Do you have a redirect in place to map your forum.mydomain.com to mydomain.com/forum?  Is it thru cPanel?  If so, does your cPanel also have an option for an https redirect?  (If so, this part will be easy!)

QuoteIt showed Maintenance Mode: "Value not found" So I set it to OFF.
It showed Queryless URLs: "Value Not Found" so I set it to OFF.
It showed Database Engine: "Value not found" but had MySQL selected in the dropdown box, which is correct. So I left it alone.

You should set Maintenance Mode if you want the 'site is under maintenance' message to appear to visitors.  Not the problem.

Leave the Queryless URLs parameter alone.  Once considered an important feature, it's largely unused now.  Possibly part of this problem???  I'd leave that setting alone.

Regarding the Database Engine parameter, you should probably explicitly set it to MySQL.  Possibly part of this problem. 

Next time you try this, if you experience issues, save the problematic copy of Settings.php before restoring it.  Then you can compare it with your current one & better understand the issue.

Regarding mixed content, different folks have found the mixed content hidden in different places, and you will likely have to hunt those down after converting to https.  Sometimes it's links in mods, sometimes your forum logo, sometimes it's just http:// images shared by folks in posts (the image proxy is designed to assist with this). 

I think all major browsers at the moment do in fact default to showing mixed content sites today. 
Title: Re: Converting to https, step-by-step...
Post by: daverj on March 14, 2020, 08:42:05 PM
There is no $db_type parameter in the Settings.php file. Which is probably why Repair_settings.php flagged it as "Value not found". When I saved the settings in Repair_settings.php the db was set to MySQL in the dropdown box (by default).

The db is MySQL. On the admin Support and Credits page it shows:

Database Server: MySQL
MySQL version: 5.7.29
PHP: 5.6.40
Server version: Apache

Likewise there is no $maintenance field in the current Settings.php file, also probably why it was flagged as Value not found.

The SSI Username and SSI password were also flagged as Value not found in Repair_settings.php, and are not in the Settings.php file. I left them alone

The forum is installed in a folder called forum. Apache is configured so that folder is a subdomain. So you can reach it either through forum.mydomain.com or through mydomain.com/forum. Since the $boardurl is set as "http://forum.mydomain.com" then if you log in at mydomain.com/forum it will then change the URL to forum.mydomain.com as you log in.

The $boarddir is set to "/home/myaccountname/public_html/forum"

No mods installed.
Title: Re: Converting to https, step-by-step...
Post by: HusaBob on March 15, 2020, 10:25:07 AM
Converting to https is impossible!! I gave up. We're going to have to go with a different type of forum and lose 12 years of data. There's no way it has to be so difficult that you need a NASA programmer!
Title: Re: Converting to https, step-by-step...
Post by: shawnb61 on March 15, 2020, 02:19:48 PM
Not impossible.  For most, it's just a matter of changing the URLs.  Some environments are a bit more of a challenge for one reason or another.

daverj - Next time you try, I would suggest leaving all unrelated parameters untouched.  If it's working, don't fix it! 

If you have issues, here's something to try...  I attempted to reproduce your environment, and I definitely had issues when the $boardurl set to "forum.mydomain.com" and the $boarddir set to "/home/myaccountname/public_html/forum".  Everything worked perfectly when I set $boardurl to "mydomain.com/forum".   

Hope this helps,
Title: Re: Converting to https, step-by-step...
Post by: lather on March 15, 2020, 02:38:03 PM
I am admin for a 2.0.15 site and converted to https today, following the steps in the original post. testing with the Why No Padlock site shows this:
Mixed Content - Errors
Soft Failure An image with an insecure url of "http://ridemsta.com/mstalogo1.png" was loaded on line: 65 of https://www.ridemsta.com/mstaforums/.
This URL will need to be updated to use a secure URL for your padlock to return.

I assume the message refers to include.php but there is no url at line 65. In fact I have searched the entire contents of the forum folder and sub folders using fileseek search tool by binaryfortress but cannot find this line. Can anyone help? Thanks
Title: Re: Converting to https, step-by-step...
Post by: shawnb61 on March 15, 2020, 02:50:28 PM
That looks like it's your forum logo.  You should change that to https also.  It's one of your theme settings.

Look under Admin | Configuration | Theme Settings.

You will see a list of themes.  For each theme in use, click on the theme header, which is a link where you can see the theme settings.  Take a look at the setting for the logo image URL. 

Hope this helps,
Title: Re: Converting to https, step-by-step...
Post by: HusaBob on March 15, 2020, 03:37:41 PM
I'd like to try converting but am afraid I'd blow up the forum. Trying to find instructions on how to make a working copy of the forum is impossible.
Title: Re: Converting to https, step-by-step...
Post by: lather on March 15, 2020, 04:50:01 PM
Quote from: shawnb61 on March 15, 2020, 02:50:28 PM
That looks like it's your forum logo.  You should change that to https also.  It's one of your theme settings.

Look under Admin | Configuration | Theme Settings.

You will see a list of themes.  For each theme in use, click on the theme header, which is a link where you can see the theme settings.  Take a look at the setting for the logo image URL. 

Hope this helps,
Yes, that did it. THANKS!
Title: Re: Converting to https, step-by-step...
Post by: Kindred on March 16, 2020, 01:07:18 PM
Quote from: HusaBob on March 15, 2020, 03:37:41 PM
I'd like to try converting but am afraid I'd blow up the forum. Trying to find instructions on how to make a working copy of the forum is impossible.

https://wiki.simplemachines.org/smf/Backup

https://wiki.simplemachines.org/smf/Hosting_-_How_do_I_move_my_SMF_forum_to_a_different_host


follow the "install on a different host" instructions -- but apply them to your own host, in a new subdomain or subdirectory with a new database
Title: Re: Converting to https, step-by-step...
Post by: HusaBob on March 17, 2020, 08:30:22 PM
Quote from: Kindred on March 16, 2020, 01:07:18 PM
Quote from: HusaBob on March 15, 2020, 03:37:41 PM
I'd like to try converting but am afraid I'd blow up the forum. Trying to find instructions on how to make a working copy of the forum is impossible.

https://wiki.simplemachines.org/smf/Backup

https://wiki.simplemachines.org/smf/Hosting_-_How_do_I_move_my_SMF_forum_to_a_different_host


follow the "install on a different host" instructions -- but apply them to your own host, in a new subdomain or subdirectory with a new database

Thanks - but not simple enough!
Title: Re: Converting to https, step-by-step...
Post by: shadav on October 25, 2020, 10:32:08 PM
thanks for this
I was able to get 2 of my forums but having issue with one that is one a subdomain, I keep getting 403 errors  :-\
and the only thing I can figure is because it's forum.tld instead of tld/forum

was able to roll the site back and it's at least working again but can't seem to get it to work with https

any ideas/suggestions
Title: Re: Converting to https, step-by-step...
Post by: shawnb61 on October 25, 2020, 11:01:31 PM
Hmmm...  First guess is something with the .htaccess...
Title: Re: Converting to https, step-by-step...
Post by: thatjustit on March 14, 2021, 08:26:44 PM
Great guide, I did all the points and it works well, no mixed content.
Title: Re: Converting to https, step-by-step...
Post by: drewactual on March 15, 2021, 11:10:01 PM
Quote from: shadav on October 25, 2020, 10:32:08 PM
thanks for this
I was able to get 2 of my forums but having issue with one that is one a subdomain, I keep getting 403 errors  :-\
and the only thing I can figure is because it's forum.tld instead of tld/forum

was able to roll the site back and it's at least working again but can't seem to get it to work with https

any ideas/suggestions

Environment?  Fastcgi or php-fpm, or what?

I saw a lot of 403s when I migrated servers and was because fastcgi operates with "nobody" where fpm operates as "user"... there was some sort of conflict somewhere looking for user and discovering nobody on the files served, and which caused a 403... so... running mpm worker with php-fpm and fast-cgi as a service, users were users again instead of nobody and 403s disappeared.

Just a thought...
Title: Re: Converting to https, step-by-step...
Post by: shadav on March 16, 2021, 01:22:35 AM
Quote from: drewactual on March 15, 2021, 11:10:01 PM
Quote from: shadav on October 25, 2020, 10:32:08 PM
thanks for this
I was able to get 2 of my forums but having issue with one that is one a subdomain, I keep getting 403 errors  :-\
and the only thing I can figure is because it's forum.tld instead of tld/forum

was able to roll the site back and it's at least working again but can't seem to get it to work with https

any ideas/suggestions

Environment?  Fastcgi or php-fpm, or what?

I saw a lot of 403s when I migrated servers and was because fastcgi operates with "nobody" where fpm operates as "user"... there was some sort of conflict somewhere looking for user and discovering nobody on the files served, and which caused a 403... so... running mpm worker with php-fpm and fast-cgi as a service, users were users again instead of nobody and 403s disappeared.

Just a thought...

I have no idea....but thank you for replying....I've given up at the moment
my other forums worked just fine but not this one and they are all on the same server so it has something to do with that this one is a subdomain whereas the others aren't....

as shawn suggested it's probably something to do with the htaccess, but I kind of forgot about it  :laugh:
Title: Re: Converting to https, step-by-step...
Post by: shawnb61 on March 16, 2021, 02:52:22 PM
Another possibility is the cookie settings...  Subdomains sometimes need some special attention.

I just re-learned that lesson again. Again.
https://www.simplemachines.org/community/index.php?topic=577080.0
Title: Re: Converting to https, step-by-step...
Post by: computel on April 09, 2021, 07:06:09 PM
anyone had luck in a sub-directory setup? Here is what I see when I got to mine with HTTPS: really afraid to mess with the site I have over 10+ years of stuff.
Title: Re: Converting to https, step-by-step...
Post by: Illori on April 09, 2021, 07:45:11 PM
you did not run repair_settings.php and redirect your forum to be forced https.

What is repair_settings.php? (http://wiki.simplemachines.org/smf/Repair_settings.php)
Title: Re: Converting to https, step-by-step...
Post by: computel on April 09, 2021, 10:47:25 PM
I did a .htaccess force HTTPS and that is what it showed in the image
Title: Re: Converting to https, step-by-step...
Post by: computel on April 09, 2021, 10:56:22 PM
Just ran it What is repair_settings.php? and got 500 server error do I need to do a .htaccess to force it? how do I force it? my domain is canadianracingonline.com/smf

Thanks
Title: Re: Converting to https, step-by-step...
Post by: Sir Osis of Liver on April 09, 2021, 11:12:37 PM
Did you upload repair_settings.php to canadianracingonline.com/smf/?  It's not there now.  You should be able to force https in cpanel domain settings.
Title: Re: Converting to https, step-by-step...
Post by: computel on April 10, 2021, 12:22:40 AM
removed it the file. I get 500 server errors what do I do?
Title: Re: Converting to https, step-by-step...
Post by: Sir Osis of Liver on April 10, 2021, 10:32:11 PM
Shouldn't get a 500 error from repair_settings.  Do you have the current version?
Title: Re: Converting to https, step-by-step...
Post by: computel on April 11, 2021, 02:14:04 AM
Downloaded it from here. as soon as I run it and then go back to the forum I get 500 errors I hit restore from the repair_settings.php and the forum works again.
Title: Re: Converting to https, step-by-step...
Post by: computel on April 11, 2021, 02:29:41 AM
Seems to work now. I copied the recommended into the spot and saved it and it works. Thanks everyone
Title: Re: Converting to https, step-by-step...
Post by: thatjustit on September 16, 2021, 01:01:14 PM
I did all the steps, forum seems to be working fine, but I can't edit or make new posts, I keep getting:
QuoteThe information you're about to submit is not secure
Because this form is being submitted using a connection that's not secure, your information will be visible to others.
Title: Re: Converting to https, step-by-step...
Post by: Kindred on September 16, 2021, 01:04:44 PM
What is your forum URL?
Title: Re: Converting to https, step-by-step...
Post by: thatjustit on September 16, 2021, 01:10:16 PM
Quote from: Kindred on September 16, 2021, 01:04:44 PMWhat is your forum URL?

https://aboard.pl/
Title: Re: Converting to https, step-by-step...
Post by: Kindred on September 16, 2021, 01:20:56 PM
yup... something is not set to https in your settings.

<link rel="canonical" href="http://aboard.pl/regulamin/regulamin/" />
<link rel="help" href="https://aboard.pl/help/" />
<link rel="search" href="https://aboard.pl/search/" />
<link rel="contents" href="https://aboard.pl/index.php" />
<link rel="alternate" type="application/rss+xml" title="Forum Wielotematyczne Ogólnotematyczne ABoard.pl - RSS" href="https://aboard.pl/.xml/?type=rss" />
<link rel="prev" href="http://aboard.pl/regulamin/regulamin/?prev_next=prev" />
<link rel="next" href="http://aboard.pl/regulamin/regulamin/?prev_next=next" />
<link rel="index" href="http://aboard.pl/regulamin/" />

and a whole bunch of the board links - some of the breadcrumb links, etc are still using http

Title: Re: Converting to https, step-by-step...
Post by: thatjustit on September 16, 2021, 02:03:21 PM
Would running repair_settings.php again help or should I download the database and mass change all remaining urls to https?
Title: Re: Converting to https, step-by-step...
Post by: Kindred on September 16, 2021, 02:24:48 PM
running repair_settings again won't hurt....

I'm not sure what mods you are using---   but SOMETHING is keeping http values in places that SHOULD be updated (but are not)

Did you make the htaccess changes as well, to force https?
Title: Re: Converting to https, step-by-step...
Post by: thatjustit on September 18, 2021, 07:33:21 PM
I did run repair_settings again to no effect and I have made changes to htaccess before, thankfully changing all urls from http to https in the database worked. Later I found out that I had a couple of wrong folder paths in my config, don't know if that might have been an issue too.
Title: Re: Converting to https, step-by-step...
Post by: Aleksi "Lex" Kilpinen on September 19, 2021, 05:45:50 AM
You at least have some url rewriting going on that is hiding the actual SMF url structure - for example you seem to be hiding index.php from your url, and that's often a bad idea.

On the other hand, pretty much everything I could visit as a guest seem to be secure now, so you've got most of it figured out already I guess.
Title: Re: Converting to https, step-by-step...
Post by: landyvlad on September 27, 2021, 10:59:08 AM
Is the process for this still the same with 2.1 as it was with 2.0 ?

I followed all the usual steps including creating the htaccess file with relevant code
Ran repair_settings.php to change all to https:
Have a (self-signed) SSL certificate on the server (host supplied)

and now weirdness ensues

ytyak.com <- doesn't work
www.ytyak.com <- does work but shows as not secure.

Thoughts?
Title: Re: Converting to https, step-by-step...
Post by: Kindred on September 27, 2021, 11:13:57 AM
yes, the procedure has not changed....


works fine for me on several sites running both 2.0.18 and 2.1 RC4

The certificate should be set at the ROOT domain....   (setting a cert for www technically sets it for only the www subdomain)
Title: Re: Converting to https, step-by-step...
Post by: Arantor on September 27, 2021, 11:25:35 AM
Self signed certificates are rarely a good idea outside of testing or very specific situations; Let's Encrypt is free and most hosts have it set up now.
Title: Re: Converting to https, step-by-step...
Post by: landyvlad on September 27, 2021, 05:40:43 PM
I had certificate installed wrong - host has sorted it and now working. Thanks all !!!
Title: Re: Converting to https, step-by-step...
Post by: shadav on September 27, 2021, 05:53:06 PM
guess I'll update, came back around to this again last week on my one site (the forum that was on a subdomain) that wasn't working
tried again and still wasn't working
then I went and played with cloudflare settings and it all started working
however I had to skip adding the code into my .htaccess otherwise I kept getting too many redirect errors

but finally all of my sites are converted to https
Thanks for all the help

side note, if you use mods you will need to check their settings in the admin and make sure to change any http over to https
I also had to make changes to some source files and in my database
and of course anywhere in the template files where I hard coded an image or url
Title: Re: Converting to https, step-by-step...
Post by: Kindred on September 27, 2021, 10:06:33 PM
Quote from: shadav on September 27, 2021, 05:53:06 PMtemplate files where I hard coded an image or url

We would you use full urls?
I always use relative urls for hard coded links and images
Title: Re: Converting to https, step-by-step...
Post by: shadav on September 27, 2021, 10:27:40 PM
Quote from: Kindred on September 27, 2021, 10:06:33 PM
Quote from: shadav on September 27, 2021, 05:53:06 PMtemplate files where I hard coded an image or url

We would you use full urls?
I always use relative urls for hard coded links and images
the images aren't in the subdomain, they are located on the main domain and the urls point to external links

but yes you are correct, if I was using images and urls based off the forum's path I would use relative paths/urls instead

but the site in question is a fansite so the urls are to the creator and ways to donate/support them
Title: Re: Converting to https, step-by-step...
Post by: landyvlad on September 27, 2021, 10:44:59 PM
Hmm so now I am getting occasional 403 errors but when I forced refresh I got through to the site.
ytyak.co,

any suggestions?
Title: Re: Converting to https, step-by-step...
Post by: shadav on September 27, 2021, 11:24:59 PM
Quote from: landyvlad on September 27, 2021, 10:44:59 PMHmm so now I am getting occasional 403 errors but when I forced refresh I got through to the site.
ytyak.co,

any suggestions?

I'm getting error
DNS_PROBE_FINISHED_NXDOMAIN
when visiting the link
Title: Re: Converting to https, step-by-step...
Post by: Aleksi "Lex" Kilpinen on September 28, 2021, 05:34:59 PM
Quote from: landyvlad on September 27, 2021, 10:44:59 PMHmm so now I am getting occasional 403 errors but when I forced refresh I got through to the site.
ytyak.co,

any suggestions?

ytyak.co doesn't seem to exist according to my DNS - NXDOMAIN (50.7ms)
And it would appear to be available for purchase (did a quick test through GoDaddy domain search).
Title: Re: Converting to https, step-by-step...
Post by: shawnb61 on September 28, 2021, 05:40:43 PM
It's a typo.  It's .com
Title: Re: Converting to https, step-by-step...
Post by: Aleksi "Lex" Kilpinen on September 28, 2021, 05:44:48 PM
Ah, the wwwRedirect seems to trigger a 403. Should be logged in the server's error log, I'd suspect it's most likely some security feature on the server getting a kick out of the redirect for some reason.
Title: Re: Converting to https, step-by-step...
Post by: shadav on September 28, 2021, 07:02:30 PM
fyi if using cloudflare don't put the redirect in the htaccess
just use cloudflare's settings to redirect http to https
Title: Re: Converting to https, step-by-step...
Post by: Dr Web on October 13, 2021, 08:32:34 AM
I just installed a new 2.0.18 smf forum. My host installed the certificate on my server so I already can access my site through https without any errors or warnings.

Now I want to redirect http://mysmfforum.pt and http://www.mysmfforum.pt to https://www.mysmfforum.pt

Resuming, I want to redirect non www and www to https://www

How do I do this? Simply using the code below that is on the first post of this topic?

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Title: Re: Converting to https, step-by-step...
Post by: Kindred on October 13, 2021, 10:24:35 AM
yes, that should do it
Title: Re: Converting to https, step-by-step...
Post by: Dr Web on October 13, 2021, 10:55:01 AM
First all was ok, and only mysmfforum.pt was not redirecting properly, it was redirecting to https://mysmfforum.pt, not forcing the www, and the site was looking weird, without template, but now it's redirecting and working well.

Thank you.

Title: Re: Converting to https, step-by-step...
Post by: shanamendez on December 03, 2021, 12:10:36 AM
thanks for your guide i have following your guideline and Convert my perfect essay writing website HTTP to HTTPS.
Title: Re: Converting to https, step-by-step...
Post by: Karmasterrr on January 29, 2022, 04:04:21 PM
One general issue is not covered by the guide:
After migration to https, old posts contain old links to http:// forum topics, posts (messages) and images.
This should be fixed for SEO reasons.
I thought option "force SSL" in admin settings could fix it, but it is not.

Is there any mod already for that or should I write a new one? (SMF 2.1 RC3)
Title: Re: Converting to https, step-by-step...
Post by: Kindred on January 29, 2022, 04:08:03 PM
No mod...
But,no mod needed

Just set your htaccess to force redirect all http urls to use https
Title: Re: Converting to https, step-by-step...
Post by: Karmasterrr on January 29, 2022, 04:13:17 PM
Quote from: Kindred on January 29, 2022, 04:08:03 PMNo mod...
But,no mod needed

Just set your htaccess to force redirect all http urls to use https
Redirect already works and forum works, but that is not what I am addressing. SEO!
Title: Re: Converting to https, step-by-step...
Post by: Arantor on January 29, 2022, 04:23:14 PM
And the SEO part will be just fine if the redirect is set to use 301 redirects.

If you honestly must rewrite the links - and it's honestly not necessary - REPLACE() in MySQL is your friend, e.g.

UPDATE smf_messages SET body = REPLACE(body, 'http://example.com/', 'https://example.com/');
Since this is a one-way only change, do a backup first just in case.
Title: Re: Converting to https, step-by-step...
Post by: Narheru on February 23, 2022, 05:04:45 AM
Hello There!
I'm trying to update my forum at httpS url, but it doesn't seem to work. I'm using an SSL certificate given by my hosting. I followed every steps and inside the repair_settings.php I also have seen the updated urls to "httpS", but still, the forum is not working.
QuoteNot Found
The requested URL was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Right now I cannot access either to the repair_settings file.

The url is https://www.dcleaguers.it/forum/index.php

I don't know if it can help, but I cannot convert either my Wordpress installation in the root folder. It seems to not work for some reason :/. If I write https://www.dcleaguers.it/ it doen't work. The only mod that I can think of to create some problem would be "Pretty urls", but It affect also the wordpress installation, so maybe is something esle wrong...

Ah, at least but not last, this is my .htaccess file
<Files "xmlrpc.php">
Order Allow,Deny
deny from all
</Files>

# BEGIN WordPress
# Le direttive (linee) tra `BEGIN WordPress` e `END WordPress` sono
# generate dinamicamente, e dovrebbero essere modificate solo tramite i filtri di WordPress.
# Ogni modifica alle direttive tra questi marcatori verrà sovrascritta.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# RewriteCond %{HTTP_REFERER} !^$
# RewriteCond %{HTTP_REFERER} !^http://dcleaguers.com/.*$      [NC]
# RewriteCond %{HTTP_REFERER} !^http://dcleaguers.com$      [NC]
# RewriteCond %{HTTP_REFERER} !^http://dcleaguers.it/.*$      [NC]
# RewriteCond %{HTTP_REFERER} !^http://dcleaguers.it$      [NC]
# RewriteCond %{HTTP_REFERER} !^http://flash.dcleaguers.it/.*$      [NC]
# RewriteCond %{HTTP_REFERER} !^http://flash.dcleaguers.it$      [NC]
# RewriteCond %{HTTP_REFERER} !^http://google.com/.*$      [NC]
# RewriteCond %{HTTP_REFERER} !^http://google.com$      [NC]
# RewriteCond %{HTTP_REFERER} !^http://google.it/.*$      [NC]
# RewriteCond %{HTTP_REFERER} !^http://google.it$      [NC]
# RewriteCond %{HTTP_REFERER} !^http://images.google.com/.*$      [NC]
# RewriteCond %{HTTP_REFERER} !^http://images.google.com$      [NC]
# RewriteCond %{HTTP_REFERER} !^http://images.google.com*/.*$      [NC]
# RewriteCond %{HTTP_REFERER} !^http://images.google.com*$      [NC]
# RewriteCond %{HTTP_REFERER} !^http://www.dcleaguers.com/.*$      [NC]
# RewriteCond %{HTTP_REFERER} !^http://www.dcleaguers.com$      [NC]
# RewriteCond %{HTTP_REFERER} !^http://www.dcleaguers.it/.*$      [NC]
# RewriteCond %{HTTP_REFERER} !^http://www.dcleaguers.it$      [NC]
# RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ http://25.media.tumblr.com/tumblr_m86g42z3Vy1qet655o1_250.jpg [R,NC]
.

I "inherited" this webstie, so...I don't it very well for now.


Edit: I SOLVED it by myself. Enabling the SSL urls the forum (and the site) was redirecting to the private_html instead of the public_html. I enabled a symbolic link between the two folders and the problem was solved. Thanks!
Title: Re: Converting to https, step-by-step...
Post by: andy12gr on March 17, 2022, 04:26:08 PM
I have the site https://stray-animals.com
Yestarday i buy ssl cert, for 1 day all ok
but i have a message
Secure Connection Failed

An error occurred during a connection to stray-animals.com. Peer's Certificate has been revoked.

Error code: SEC_ERROR_REVOKED_CERTIFICATE

any help?
Title: Re: Converting to https, step-by-step...
Post by: Aleksi "Lex" Kilpinen on March 17, 2022, 04:37:08 PM
I see no issue, if you try another browser do you still see that error?
Title: Re: Converting to https, step-by-step...
Post by: Oldiesmann on March 17, 2022, 11:11:53 PM
Works for me in Chrome but not Firefox. Strange.
Title: Re: Converting to https, step-by-step...
Post by: Aleksi "Lex" Kilpinen on March 18, 2022, 12:28:08 AM
Quote from: Oldiesmann on March 17, 2022, 11:11:53 PMWorks for me in Chrome but not Firefox. Strange.
Actually not at all, that's exactly what I expected. They approach this situation differently.
https://certificate.revocationcheck.com/stray-animals.com
Title: Re: Converting to https, step-by-step...
Post by: andy12gr on March 18, 2022, 11:52:45 AM
Thanks for the reply
The morning is ok and afternoon it is not ok :laugh:
only mozilla is open sometimes, the others browsers nothing open
Title: Re: Converting to https, step-by-step...
Post by: Aleksi "Lex" Kilpinen on March 18, 2022, 11:54:29 AM
If the certificate is through your host, then contact them.
Also, you do seem to have some other issues with the server - Now that I tried to check again, all I got was a HTTP 500 Error.
Title: Re: Converting to https, step-by-step...
Post by: andy12gr on March 18, 2022, 12:23:14 PM
i suppose that the HTTP 500 Error is from hosting not from certificate?
Title: Re: Converting to https, step-by-step...
Post by: Doug Heffernan on March 18, 2022, 12:26:06 PM
Quote from: andy12gr on March 18, 2022, 12:23:14 PMi suppose that the HTTP 500 Error is from hosting not from certificate?

Yes, that type of error is usually host related.
Title: Re: Converting to https, step-by-step...
Post by: andy12gr on March 18, 2022, 12:32:01 PM
ok, thanks. i call the godaddy  :)
Title: Re: Converting to https, step-by-step...
Post by: Aleksi "Lex" Kilpinen on March 18, 2022, 12:34:51 PM
Sorry to hear that. GoDaddy isn't very well liked around here, not many would recommend them.
Title: Re: Converting to https, step-by-step...
Post by: Doug Heffernan on March 18, 2022, 12:36:08 PM
Quote from: andy12gr on March 18, 2022, 12:32:01 PMok, thanks. i call the godaddy  :)

Better yet, start looking for a new host.
Title: Re: Converting to https, step-by-step...
Post by: andy12gr on March 18, 2022, 12:49:03 PM
Quote from: Aleksi "Lex" Kilpinen on March 18, 2022, 12:34:51 PMSorry to hear that. GoDaddy isn't very well liked around here, not many would recommend them.
thanks for reply. Maybe i move the site in other hosting
Title: Re: Converting to https, step-by-step...
Post by: Sir Osis of Liver on March 18, 2022, 12:54:29 PM

Detected at: 3/18/2022 12:53:43 PM

URL: stray-animals.com

Reason: Authorization for this certificate or one of the certificates in the certificate chain was canceled.
Title: Re: Converting to https, step-by-step...
Post by: andy12gr on March 19, 2022, 04:57:58 AM
Today all ara ok, i think
The site is up
i close in mozilla the OCSP
its ok for you?
Title: Re: Converting to https, step-by-step...
Post by: Aleksi "Lex" Kilpinen on March 19, 2022, 05:13:23 AM
Looks good to me, site works and Chrome accepts the cert as well.
But https://certificate.revocationcheck.com/stray-animals.com suggests there might still be an issue in the certificate chain. This may not cause issues, but it might be good to keep an eye on.
Title: Re: Converting to https, step-by-step...
Post by: andy12gr on March 21, 2022, 03:58:22 PM
I think the  https://certificate.revocationcheck.com/www.stray-animals.com  is OK?
Title: Re: Converting to https, step-by-step...
Post by: Sir Osis of Liver on March 21, 2022, 08:49:33 PM
Kaspersky not reporting any problems.  If the Komitet likes it, it's ok. ;)
Title: Re: Converting to https, step-by-step...
Post by: FaustVasea on December 14, 2022, 02:10:51 PM
Hi. I've tried to enable my SSL, however for some reason isn't working. And I can't enable that through admin panel. Any help ?
Title: Re: Converting to https, step-by-step...
Post by: Oldiesmann on December 17, 2022, 09:25:34 PM
What isn't working about it? Are you able to access your site via https?
Title: Re: Converting to https, step-by-step...
Post by: dodos26 on December 24, 2022, 02:31:26 PM
This, also dont work for me:
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

I use this:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
Title: Re: Converting to https, step-by-step...
Post by: DeadMan... on January 08, 2023, 09:00:56 PM
This is what you should use, @dodos26

RewriteEngine on
RewriteCond %{HTTP_HOST} ^yourdomain\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.yourdomain\.com$
RewriteCond %{ENV:HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
Title: Re: Converting to https, step-by-step...
Post by: dodos26 on January 09, 2023, 05:45:01 PM
Could you give some explanation? Description of these activities. Why it? not what i use? what I use was offered to me by the supplier.
Title: Re: Converting to https, step-by-step...
Post by: DeadMan... on January 09, 2023, 07:19:52 PM
What I posted will do the job for you.
It's the same thing that I use for all my sites, including my own web host.
It'll make sure that the site gets https with either www. or no www. which makes it secured for both ways as some people type in URLs without the www.