News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

ssl for images

Started by Jeff B, December 05, 2019, 01:26:37 PM

Previous topic - Next topic

Jeff B

Wasn't quite sure what to name this topic.  Here is my situation. I am about to install a secure server certificate. I think I have a handle on what I need to do in regards to the forum itself, but I have another issue.  Our forum has been around going on 20 yrs. From the beginning we required images to be in a bridged coppermine gallery to share in posts. We do not allow offsite images (THANK GOD THINK PHOTOBUCKET)  So, all images posted on our site are on our domain.  The file paths are all within our domain. How can I handle this once I enable the SSL so that all these http addresses don't show up as unsecure content to the browser?  .htaccess? Some other way.  We are talking well over a quarter million photos.

vbgamer45

You can do a mysql find and replace on the messages table in the body column to change the link url from http://imagepath to https://imagepath
Always backup your database first


update smf_messages set body = REPLACE(body, "http://imagepath", "https://imagepath");
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Illori

cant you just enable the image proxy and let it handle it? then you don't need to modify anything.

Arantor

Quote from: Illori on December 05, 2019, 01:37:48 PM
cant you just enable the image proxy and let it handle it? then you don't need to modify anything.

For the size and scale, fixing it is likely better.

vbgamer45

Also more efficient in the long run instead of storing duplicate images and causing proxy.php to be called for the image requests
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Jeff B

Yes, the proxy images the way I understand it seems like the forum would be taxed pretty hard, since there are probably photos is almost every topic page.

Is phpmyadmin sufficient to make a call like that for a forum with going on 2 million posts?  Or is there a better way?


vbgamer45

Should be since the query should just execute. I would put site on maintenance mode just to prevent slowdowns when you run it.

If not command line mysql
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

lurkalot

Assuming the SSL cert also covers the domain where the gallery resides. 

In Coppermine, click "Config", and under general settings, change the URL of your Coppermine gallery folder to from http to https

Jeff B

Thank you! If okay, I'd like to keep this topic open until I get this completed? It might not happen until after the holidays.

Jeff B

I've started this project. I have not addressed the gallery photos as of yet as I am trying to sort out all the other non-secure content first.  I am getting this in the firefox console and I cannot find the source of the conflict. any ideas on where to look? It is the last two instances I have on the board index page, on which I started.

Loading mixed (insecure) display content "https://mywebsite/board/uploaded_avatars/avatar_10176_1396655806.jpeg" on a secure pagescript.js:491:2
Loading mixed (insecure) display content "https://mywebsite/board/uploaded_avatars/avatar_10176_1396655806.jpeg" on a secure pagescript.js:491:2

Kindred

that would be some user's avatar....
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Illori

if the image proxy is enabled, it should handle that for you.

basically it is all the same issue, you either manually convert the URLs and enable the image proxy or you just enable the image proxy.

Jeff B

I enabled the image proxy with no love.  This actually shows up on all pages, not just the index. Maybe something in an old template edit somewhere?

Illori

link to where it is happening?

Jeff B


Jeff B

Another note,  I just went and checked, it only occurs when logged in. If you are not logged in, the page is clear.

Illori

then we need the link provided in this topic so anyone that has time can assist you, along with a test log in so we can actually see the issue.

Jeff B

More testing.  I logged into the test account and it doesn't do it. However, I changed the test account to an admin account, and then it occurs, but the error points to a different avatar. There should be NO avatars displayed on the page.  https://www.forestryforum.com/board/index.php

I would need to provide an admin account.

Jeff B

I can provide an admin account but I got a warning about sending a pm unless asked to specifically to do so.

Jeff B

Okay, it does not have to be an admin account. I went back to the test account and added an avatar to the account. It then started throwing the content error for that login.  I deleted the avatar, but the error now remains.  Who can I send the test account login to?

Advertisement: