Loading


Advertisement:

Author Topic: Osclass backend broken with ssl!  (Read 108 times)

mrosc

  • Newbie
  • *
  • Posts: 28
Osclass backend broken with ssl!
« on: May 18, 2017, 06:10:53 pm »
Hello, i have enabled ssl and it works without problems in osclass front end, but osclass admin is just plain text

It looks like it doesn't have css and it takes a while to load the page. i have inspected the source and there is no non-secure links in the page.

Can someone help me find where is the issue? i can't do anything in my admin

edit:
i use cloudflare ssl and i have the same problem discussed in this post
https://wordpress.stackexchange.com/questions/75921/ssl-breaks-wordpress-css

looks like the solution is this:
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') $_SERVER['HTTPS']='on';

But i don't know where it should go, tried config.php didn't work
« Last Edit: May 18, 2017, 06:23:16 pm by mrosc »

tito

  • Full Member
  • ***
  • Posts: 110
Re: Osclass backend broken with ssl!
« Reply #1 on: May 18, 2017, 07:27:37 pm »
Your htaccess looks like this?

Code: [Select]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4555
Re: Osclass backend broken with ssl!
« Reply #2 on: May 18, 2017, 07:29:21 pm »
After adding the ssl/certificate, you need to modify config.php and change your WEB_PATH from http://.... to https://....

mrosc

  • Newbie
  • *
  • Posts: 28
Re: Osclass backend broken with ssl!
« Reply #3 on: May 18, 2017, 09:44:19 pm »
i had working ssl for over a year now, this problem happened after changing to cloudflare ssl confug and htaccess is fine, front end works fine. Backend is broken
Quote
This type of CSS "breaking" is caused mostly due to accessing files via HTTP request on an HTTPS connection, or to be short, accessing insecure files.
Any way to fix this through osclass?

mrosc

  • Newbie
  • *
  • Posts: 28
Re: Osclass backend broken with ssl!
« Reply #4 on: May 19, 2017, 02:59:30 am »
is there any other way to load admin main.css? can i take the entire code from main.css and place it directly in header or body? is this possible? if yes where should it go?

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4555
Re: Osclass backend broken with ssl!
« Reply #5 on: May 19, 2017, 09:27:49 am »
Just change your config.php. If it's still wrong, then it may be something else, open your browser's console and see what it's failing.

mrosc

  • Newbie
  • *
  • Posts: 28
Re: Osclass backend broken with ssl!
« Reply #6 on: May 19, 2017, 06:41:42 pm »
Looks like my host started blocking cloudflare ip's for some reason its solved