switch gallery from http to https switch gallery from http to https
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

switch gallery from http to https

Started by brynn, July 17, 2017, 10:13:59 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

brynn

Hi Friends,
A few months ago, my host at that time had switched to https.  He had instructed me about changing the IP addresses, and changing the SFTP connection, and all that.  But nothing else (at least nothing I could understand).

My gallery (version 1.5.34) is here:  http://inkscapecommunity.com/ic_gallery/index.php

Now I've moved to a new host, which also has https certificate, and I've just realized that change to https has had some other consequences that I didn't realize at the time.  Like a couple my custom pages were missing parts (because I needed to change the referring urls to the sections), for example.  But another issue is the gallery.  If you add the "s" to that url, you can see that something's not right.

At first I thought it was something about the theme that needed to be fixed - like the images reuploaded.  Or some other kind of adjustment.  But now as I look at it, it seems like most of the parts of the custom theme are there.  So I'm trying to figure out what I need to do, to make it work on https.

I notice that new images uploaded to the gallery have the old http url.  So maybe it's not even possible for CPG to run under https certificate?  Or maybe I would need to reinstall the whole thing, to bring it under https?

Or maybe there's a simple fix?  It couldn't be as simple as changing the gallery URL under Config > General, could it?

I don't really have the inclination to try and change the whole site to https.  Because it existed under http for a couple of years, and that would be a huge task.  So if it's going to be a huge task to change the gallery to https, I might just leave it as is.

But I'd like to understand what would be needed, so I can make a decision.  (Yes, I did look through the documentation.  If the answer is there, I just didn't find it.)

Thanks for your help. 

ron4mac

You'll need to change the site url in General Settings to reflect the https prefix.
And, if you want the site to always be accessed as https://.... you should setup redirection from http to https in a .htaccess file.

If there is no real need, it looks like you could just keep using http:// as it is now.

brynn

Sorry for the delay.  I got distracted.  Thanks for your comments.

Yes, I found the place to change the gallery URL.  I guess I'll make a fresh backup of the gallery first (just in case), and then try changing it.  If it doesn't screw anything up, then at least going forward, the gallery will be under the certificate....  Right?

I was discussing with my new host about setting up a redirect.  The problem (as far as I understand) is that so much of the site exists under http, if everything is redirected to https, then a lot of existing links which people might have made, either inside the forum or outside, will no longer work.

I just think it would be a huge task to try and convert the whole site to https.  If I knew anything about scripts or terminals or commandlines, or etc. it might be a different story.

I guess the only remaining question for me is this.  If I change the gallery url to https, that means that doing forward, when someone uploads a new image, it will get the https url.  Right?

Thanks again  :)

ron4mac

Quote from: brynn on July 24, 2017, 05:56:14 AM
I guess I'll make a fresh backup of the gallery first (just in case), and then try changing it.  If it doesn't screw anything up, then at least going forward, the gallery will be under the certificate....  Right?

If I change the gallery url to https, that means that doing forward, when someone uploads a new image, it will get the https url.  Right?
Changing the gallery's url setting to https://... means only that when it is accessed as https://... , it will work correctly. And it is ONLY under the certificate when accessed as https://...

ron4mac

You already have some redirection in place.

https://inkscapecommunity.com redirects to http://forum.inkscapecommunity.com

And for the link to your gallery from SMF, you would need to add https:// to it.

brynn

Quote from: ron4mac on July 24, 2017, 03:57:37 PM
You already have some redirection in place.

https://inkscapecommunity.com redirects to http://forum.inkscapecommunity.com

Hhmm....I don't see any record of that in the server control panel.  I wonder how that happens?  Maybe I'll ask my host.

Yes, I was already aware that the link to the gallery from the forum went to http.  I didn't want to change that, until I change the gallery url.  Well actually, I did change it.  But that's when I discovered the problem.

Anyway, thanks for your help and answering my questions.

If it's ok, I'll leave this topic open until I've sorted these issues.  (I'm about to log off, and won't be back until tomorrow, so I won't start the backup immediately.)  Don't worry, I won't forget to close it, when I'm sure everything is settled.

Thanks again :)

brynn

Sorry for the delay.

Ok, I changed the gallery url to https, as you suggested, via Config > General Settings > URL of your Coppermine gallery folder. 
But that didn't fix the problem.  It looks exactly the same as it was looking when I added the missing s manually.

https://inkscapecommunity.com/ic_gallery/index.php

Since I have a custom theme, which some people here made for me a few years ago, I'm thinking I might need to add an s there as well?

ron4mac

#7
Yes .. if the theme has hard coded urls to css, js and images etc., the http: part should be removed.
So - http://inkscapecommunity.com/ic_gallery/....
Becomes - //inkscapecommunity.com/ic_gallery/....