Advertisement:

Author Topic: SSL / https updating to this - problems  (Read 553 times)

Offline nax

  • Jr. Member
  • **
  • Posts: 367
  • Gender: Male
SSL / https updating to this - problems
« on: July 04, 2019, 12:09:26 PM »
Hi I'm using SMF 2.0.15 and I have an SSL certificate installed on my server. I followed the instructions to upgrade to https
https://www.simplemachines.org/community/index.php?topic=555034.msg3934593#msg3934593

 and completed one site successfully but my own site is having problems with paths to directories. PLease see the attached I really could do with some help here.

Offline shawnb61

  • Support Specialist
  • Sophist Member
  • *
  • Posts: 1,200
    • sbulen on GitHub
Re: SSL / https updating to this - problems
« Reply #1 on: July 04, 2019, 12:39:41 PM »
Are the contents of the directories OK?   

What are the file permissions on the files in those directories?

Did you move/relocate folders or do any other actions?  Or were you just converting to https in-place? 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline nax

  • Jr. Member
  • **
  • Posts: 367
  • Gender: Male
Re: SSL / https updating to this - problems
« Reply #2 on: July 04, 2019, 01:15:28 PM »
I was just converting in place the permissions on /public_html/funforest/Smileys is 755 the forum has been working fine up until me trying to enforce https

Offline nax

  • Jr. Member
  • **
  • Posts: 367
  • Gender: Male
Re: SSL / https updating to this - problems
« Reply #3 on: July 04, 2019, 01:28:07 PM »
the .htaccess looks ok here's the start of it.

RewriteEngine on

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

<Files 403.shtml>
order allow,deny
allow from all
</Files>

deny from 95.211.132.70
deny from 93.158.151.25
deny from 93.100.188.220


I try loading an image
https://www.naxfun.com/funforest/Themes/brightforest_23/images/off.gif and I get an error but if I try http: it works

http://www.naxfun.com/funforest/Themes/brightforest_23/images/off.gif

and https is set for this location in repair_settings (see the attachment) - I'm foxed.


Offline nax

  • Jr. Member
  • **
  • Posts: 367
  • Gender: Male
Re: SSL / https updating to this - problems
« Reply #4 on: July 04, 2019, 01:40:39 PM »
Same with smileys https doesn't work but loading in a web page using just http loads the image the setting in repair_settings.php is

Smileys URL:   
https://www.naxfun.com/funforest/Smileys
Recommended value: "https://www.naxfun.com/funforest/Smileys".

The path on the server is /public_html/funforest/Smileys/ and I changed the permissions on this file to 777 but it made no difference

Online drewactual

  • Full Member
  • ***
  • Posts: 621
    • College Football Fan Site CFB51
Re: SSL / https updating to this - problems
« Reply #5 on: July 04, 2019, 02:21:06 PM »
RewriteEngine on
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.naxfun.com/$1 [R=301,L]

use that one^, which forces WWW too... it may or may not straighten out your other issues, but it eliminates the issue of two different SSL domains (https://www and opposed to just https:// )

also.... dump your cache- all of it.  restart apache if you can in the case OPCache is running, too. 

Offline nax

  • Jr. Member
  • **
  • Posts: 367
  • Gender: Male
Re: SSL / https updating to this - problems
« Reply #6 on: July 04, 2019, 02:27:28 PM »
Made no difference, but thanks.

Online drewactual

  • Full Member
  • ***
  • Posts: 621
    • College Football Fan Site CFB51
Re: SSL / https updating to this - problems
« Reply #7 on: July 04, 2019, 02:36:27 PM »
i edited the post above- about cache.

i see there are still a bunch of calls to http:// hard coded in your index.template.   the easiest thing to do, in my humble opinion, is to open the index.template in your cpanel editor and search for http://, and paste https:// in its place... save it.  do it for the major ones which include (in your default theme if it isn't in your custom theme's directory) boardindex.template, messageindex, and display.  do the swap for https on each one of the images (and hit the links, too)  DON'T change the declaration to (xhtml) to https, leave it http- otherwise change them all. 

it appears to me your code is calling for http and if so that htaccess ain't gonna help you. 

if it were me, i would replace every call to image or INTERNAL link using short relative code as opposed to full URL's... example:

Code: [Select]
src="http://www.naxfun.com/dimages/btn_donateCC_LG.gif"

is the same as:
Code: [Select]
src="/dimages/btn_donateCC_LG.gif"

and the magic in using it? ^ is the htaccess entry you have will push it to https, AND, it's one less call your page makes through the server just to come back to you and retrieve it before sending it to the user...

if you're going multiple directories up, use:
Code: [Select]
src=".././dimages/btn_donateCC_LG.gif"or two directories up use:
Code: [Select]
src="././dimages/btn_donateCC_LG.gif"or just one:
Code: [Select]
src="./dimages/btn_donateCC_LG.gif"
but the point is to lose the: hxxp://www.naxfun.com/ part so the images, links, whatever, are being called by the relative httpS and www...

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,243
  • Gender: Male
    • Kindred-999 on GitHub
Re: SSL / https updating to this - problems
« Reply #8 on: July 04, 2019, 02:38:50 PM »
if it is an approved theme, there should be NO hardcoded image links....

if that is the case, then it indicates that the actual theme directories are still http, not https in the theme settings
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 nax

  • Jr. Member
  • **
  • Posts: 367
  • Gender: Male
Re: SSL / https updating to this - problems
« Reply #9 on: July 04, 2019, 02:50:24 PM »
It looks like the image and smileys directories are at http not https but repair_settings is showing it at https as is Funforest > Administration Center > Themes and Layout > Theme Settings

Bright Forest (2.0)
Theme directory (templates):/home/naxfunco/public_html/funforest/Themes/brightforest_23
URL to above directory:https://www.naxfun.com/funforest/Themes/brightforest_23
URL to images directory:https://www.naxfun.com/funforest/Themes/brightforest_23/images

any idea why these directories are not picking up the https setting?

drewactual- the images you are quoting I know about and will resolve in due course once this major issue is resolved.


Online drewactual

  • Full Member
  • ***
  • Posts: 621
    • College Football Fan Site CFB51
Re: SSL / https updating to this - problems
« Reply #10 on: July 04, 2019, 02:54:49 PM »
did you dump your cache and restart apache (or at least clear OPCache if you're using it)? 

it seems a lot of these issues that pop up are often cache issues.   dump your browsers cache, too...

Offline shawnb61

  • Support Specialist
  • Sophist Member
  • *
  • Posts: 1,200
    • sbulen on GitHub
Re: SSL / https updating to this - problems
« Reply #11 on: July 04, 2019, 03:07:51 PM »
I hate to say this, but...  Often the problem with repair_settings is not hitting the SAVE button...   ;D
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline nax

  • Jr. Member
  • **
  • Posts: 367
  • Gender: Male
Re: SSL / https updating to this - problems
« Reply #12 on: July 04, 2019, 03:13:51 PM »
Defo hit the save and also re ran it to check.  Just been into again all paths showing as https: no change.

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,298
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SSL / https updating to this - problems
« Reply #13 on: July 04, 2019, 04:08:10 PM »
Hmm might be hardcoded.
I recommend using this site to check for issues
https://www.whynopadlock.com/
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

Offline nax

  • Jr. Member
  • **
  • Posts: 367
  • Gender: Male
Re: SSL / https updating to this - problems
« Reply #14 on: July 04, 2019, 04:16:52 PM »
Hi Vbgamer, the errors reported by that site refer to some rotating images I have on my home page / template and my donate button.  Smileys are not working and are global not hard coded.

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,298
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SSL / https updating to this - problems
« Reply #15 on: July 04, 2019, 04:21:11 PM »
Looks like maybe bad .htaccess rules or default images not uploaded.

No images are loading from which is why your forum is messed

https://www.naxfun.com/funforest/Themes/default/images/

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

Offline nax

  • Jr. Member
  • **
  • Posts: 367
  • Gender: Male
Re: SSL / https updating to this - problems
« Reply #16 on: July 05, 2019, 05:29:37 AM »
Thanks guys I think you are pointing me in the right direction, I tried simple .htaccess file in my forum folder and I got the theme images back and my smileys.  I reloaded the .htaccess file in the root of the www folder and examined it.  Far down in a lit of deny statments I found the following:-

deny from 77.239.224.0/21
deny from 79.111.128.0/17
RewriteCond %{HTTP_REFERER} !^http://naxfun.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://naxfun.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.naxfun.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.naxfun.com$      [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp|mp3)$ - [F,NC]

Not really sure what they are but I changed the redirect to https: -
deny from 77.239.224.0/21
deny from 79.111.128.0/17
RewriteCond %{HTTP_REFERER} !^https://naxfun.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^https://naxfun.com$      [NC]
RewriteCond %{HTTP_REFERER} !^https://www.naxfun.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^https://www.naxfun.com$      [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp|mp3)$ - [F,NC]

That seems to have partially solved the problem, my background logo still needs to be addressed.

I notice that in SMF Admin/configuration, when I click on Current Theme it takes me to Themes and Layout - is this correct.  It's not just my site but a site I upgraded to https earlier.

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,298
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SSL / https updating to this - problems
« Reply #17 on: July 05, 2019, 08:26:26 AM »
Anything that is still broken on your forum?
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

Offline nax

  • Jr. Member
  • **
  • Posts: 367
  • Gender: Male
Re: SSL / https updating to this - problems
« Reply #18 on: July 05, 2019, 08:30:21 AM »
No all looks well but I'm still questioning the action ............

I notice that in SMF Admin/configuration, when I click on Current Theme it takes me to Themes and Layout - is this correct.  It's not just my site but a site I upgraded to https earlier.

Otherwise all seems ok  :D

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,298
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SSL / https updating to this - problems
« Reply #19 on: July 05, 2019, 08:43:15 AM »
Not it should go to a settings page. Unless you changed how it works in Sources/Admin.php
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