Advertisement:

Author Topic: Converting to https, step-by-step...  (Read 97144 times)

Online shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 2,293
    • sbulen on GitHub
Re: Converting to https, step-by-step...
« Reply #100 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?
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline daverj

  • Semi-Newbie
  • *
  • Posts: 10
Re: Converting to https, step-by-step...
« Reply #101 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.

Online shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 2,293
    • sbulen on GitHub
Re: Converting to https, step-by-step...
« Reply #102 on: March 14, 2020, 07:03:22 PM »
Which issues were you trying to resolve first?  The mixed content?
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline daverj

  • Semi-Newbie
  • *
  • Posts: 10
Re: Converting to https, step-by-step...
« Reply #103 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.

Online shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 2,293
    • sbulen on GitHub
Re: Converting to https, step-by-step...
« Reply #104 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!)

Quote
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.

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. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline daverj

  • Semi-Newbie
  • *
  • Posts: 10
Re: Converting to https, step-by-step...
« Reply #105 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 [nofollow]" 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.

Offline HusaBob

  • Semi-Newbie
  • *
  • Posts: 53
Re: Converting to https, step-by-step...
« Reply #106 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!

Online shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 2,293
    • sbulen on GitHub
Re: Converting to https, step-by-step...
« Reply #107 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,
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline lather

  • Semi-Newbie
  • *
  • Posts: 56
Re: Converting to https, step-by-step...
« Reply #108 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

Online shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 2,293
    • sbulen on GitHub
Re: Converting to https, step-by-step...
« Reply #109 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,
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline HusaBob

  • Semi-Newbie
  • *
  • Posts: 53
Re: Converting to https, step-by-step...
« Reply #110 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.

Offline lather

  • Semi-Newbie
  • *
  • Posts: 56
Re: Converting to https, step-by-step...
« Reply #111 on: March 15, 2020, 04:50:01 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!

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 59,427
  • Gender: Male
    • Kindred-999 on GitHub
Re: Converting to https, step-by-step...
« Reply #112 on: March 16, 2020, 01:07:18 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
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline HusaBob

  • Semi-Newbie
  • *
  • Posts: 53
Re: Converting to https, step-by-step...
« Reply #113 on: March 17, 2020, 08:30:22 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!