Author Topic: Having problems with SSL? Try this...  (Read 1138 times)

0 Members and 1 Guest are viewing this topic.

Offline W3DRM

  • Forecaster
  • *****
  • Posts: 3360
    • Emmett Weather
Having problems with SSL? Try this...
« on: February 19, 2018, 03:34:12 PM »
I am in the process of moving one of my websites to another hosting service (1and1.com). While doing this I decided to activate the FREE SSL certificate they offer. I was having issues with the website automatically initializing in the secured mode. While troubleshooting, I discovered a website that makes this process much easier. That site is as follows:
NOTE: You may have have to wade through some CAPTCHA screens but it is well worth that inconvenience. Just follow the instructions and enter in your website address (i.e., https://yoursite.com) and hit ENTER to start the tests. You will go into a queue for the service but I haven't seen it over 3 or 4 ahead of me so the wait was only a few seconds each time.

Also, when entering your website to start the test, be certain to enter in the url without the "www.". For some reason if you enter the full url, the results can be different. Perhaps it was just my website but there was a difference in the results.

The resulting report gives you details on what is causing the non-padlock condition, including a description of the issue along with a line # of the offending code. They also give you hints on how to set-up your .htaccess file so it forces the SSL session. You'll see something like the following:

Code: [Select]
RewriteEngine On
RewriteCond %{HTTP_HOST} yourwebsite\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yourwebsite.com/$1 [R,L]

This is for Linux based hosting. The process will be different for Windows based hosting.

EDIT: Here is a link from the 1and1.com website that has more detail about mixed content on ssl secured websites:
« Last Edit: February 19, 2018, 03:47:12 PM by W3DRM »
Don - W3DRM - Emmett, Idaho --- Blitzortung ID: 808 --- FlightRadar24 ID: F-KBOI7
Davis Wireless VP2, WD 10.37s150,
StartWatch, VirtualVP, VPLive, Win10 Pro
--- Logitech HD Pro C920 webcam (off-line)
--- RIPE Atlas Probe - 32849

Offline zmarfak

  • Contributor
  • ***
  • Posts: 135
    • Matar
Re: Having problems with SSL? Try this...
« Reply #1 on: February 20, 2018, 03:54:56 AM »
Hey W3DRM,
nice tips

some months ago  I moved my site to https (the hoster provided a certificate, so for that I didn't do anything).
I replaced the direct link to my webcam at home with a picture from the cam that I upload every minute to my site to avoid the mixed content problem.
One issue stays, in https://www.matar.be/weather/wxirceline.php I placed some iframes with https links, however they use http links in these webpages , so the time in the picture is not set correctly and the user has to do it with the arrows.

That can only be fixed by them.

When you have a directory, secured by paswords in a .htpasswd, I had to add in the .htaccess file :
'Options +FollowSymLinks'
to keep it working.
Patrick
Davis Vantage Pro2 with a Meteobridge NANO SD and WL (6.04) on a Intel NUC 
https://www.matar.be

 

anything