Jump to content

Archived

This topic is now archived and is closed to further replies.

JcMagpie

Need help making SSL work with Edge

Recommended Posts

Need some help please have just transferd Edge site to a new server. SSL on the website Cpanel shows it active and working. I edited the config files as normal to set SSL to true and added 'S' to all the http:/ in admin config. However when I acess site  it shows all messed up just text and picures.

I must have got somthing wrong someware?

pic1.jpg


 

Share this post


Link to post
Share on other sites

This looks like jquery is not loaded (.js and/or .css).

Check if you have the correct versions in place and included in template_top.php

Remember that this is included from catalog/ext/ via "tep_catalog_href_link". SO the catalog directory definitions ( HTTP_CATALOG_SERVER, HTTPS_CATALOG_SERVER) need to be correct.

If you are not sure, post your configure.php removing sensitive information like absolute path and database credentials.

Share this post


Link to post
Share on other sites

In the latest configure file, there are two places to set the ssl to true and four places to change http to https. It looks like you either missed some of those or didn't update the configure file with the latest one.

Share this post


Link to post
Share on other sites
12 minutes ago, raiwa said:

This looks like jquery is not loaded (.js and/or .css).

Check if you have the correct versions in place and included in template_top.php

rmember that this is included from catalog/ext/ via "tep_catalog_href_link". SO the catalog directory definitions ( HTTP_CATALOG_SERVER, HTTPS_CATALOG_SERVER) need to be correct.

Sorry not sure I understand, I thought it was just the 2 config files that were moded? or am i beeing thick? site works fine with just www.

it gose nuts when you go https:/www.


 

Share this post


Link to post
Share on other sites

If one of the definitions is not correct , the result is what I said (jquery not loaded) I just tried to explain what happens and what can be the reason. If you only modified the configure.php for sure you missed to change the 2 catalog definitions to ssl. If you did more like updating or whatever, it can be also the missing jquery files or incorrect versions.

Read also what jack said.

Share this post


Link to post
Share on other sites

I am sure I have messed up somthing. This what I have in admin/inc/con

define('HTTP_SERVER', 'http://www.*******.co.uk');
  define('HTTPS_SERVER', 'https://www.*******.co.uk');
  define('ENABLE_SSL', true);
  define('HTTP_COOKIE_DOMAIN', 'http://www.*******.co.uk');
  define('HTTPS_COOKIE_DOMAIN', 'https://www.*******.co.uk');
  define('HTTP_COOKIE_PATH', '/a********');
  define('HTTPS_COOKIE_PATH', '/a*******');
  define('HTTP_CATALOG_SERVER', 'http://www.******.co.uk');
  define('HTTPS_CATALOG_SERVER', 'https://www.*******.co.uk');
  define('ENABLE_SSL_CATALOG', 'false');

 

and in inc/con is this

define('HTTP_SERVER', 'http://www.********.co.uk');
  define('HTTPS_SERVER', 'https://www.********.co.uk');
  define('ENABLE_SSL', True);
  define('HTTP_COOKIE_DOMAIN', '');
  define('HTTPS_COOKIE_DOMAIN', '');
  define('HTTP_COOKIE_PATH', '/');
  define('HTTPS_COOKIE_PATH', '/');
  define('DIR_WS_HTTP_CATALOG', '/');
  define('DIR_WS_HTTPS_CATALOG', '/');
  define('DIR_WS_IMAGES', 'images/');


 

Share this post


Link to post
Share on other sites

And this line should be "true" in

admin/inc/con
  define('ENABLE_SSL_CATALOG', 'false');

Share this post


Link to post
Share on other sites

I have done all the changes ans SSL is working on store front. However I am unable to logint admin now,  The browser points to

https://www.*******.com/*******/login.php?action=process

and displayed page says,

The page isn't redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.


 

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

This is it,

  define('HTTP_SERVER', 'https://www.m****.com');
  define('HTTPS_SERVER', 'https://www.m****.com');
  define('ENABLE_SSL', true);
  define('HTTP_COOKIE_DOMAIN', 'https://www.m****.com');
  define('HTTPS_COOKIE_DOMAIN', 'https://www.m****.com');
  define('HTTP_COOKIE_PATH', '/*******');
  define('HTTPS_COOKIE_PATH', '/*******');
  define('HTTP_CATALOG_SERVER', 'https://www.m****.com');
  define('HTTPS_CATALOG_SERVER', 'https://www.m****.com');
  define('ENABLE_SSL_CATALOG', true);
  define('DIR_FS_DOCUMENT_ROOT', '/home/m******/public_html/');
  define('DIR_WS_ADMIN', '/a*****/');
  define('DIR_WS_HTTPS_ADMIN', '/a*****/');
  define('DIR_FS_ADMIN', '/home/m*****/public_html/a*****/');
  define('DIR_WS_CATALOG', '/');
  define('DIR_WS_HTTPS_CATALOG', '/');
  define('DIR_FS_CATALOG', '/home/m*****/public_html/');
  define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
  define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');
  define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
  define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
  define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
  define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');


 

Share this post


Link to post
Share on other sites

Seems all ok. Did you try to delete your browsers cache?

You could revert your changes step by step to find out which change produces the problem.

Share this post


Link to post
Share on other sites
4 minutes ago, raiwa said:

You could revert your changes step by step to find out which change produces the problem.

 

Share this post


Link to post
Share on other sites

I meant step by step, one change back, try, next step back, try etc. until you find out which exact change produces the problem.

Share this post


Link to post
Share on other sites

Ok thanks got it to work, Basicly had to remove some of the defines in ad/inc/con! to this

define('HTTP_SERVER', 'http://www.******.com');
  define('HTTPS_SERVER', 'https://www.******.com');
  define('ENABLE_SSL', true);
  define('HTTP_COOKIE_DOMAIN', '');
  define('HTTPS_COOKIE_DOMAIN', '');
  define('HTTP_COOKIE_PATH', '/a*****');
  define('HTTPS_COOKIE_PATH', '/a*****');
  define('HTTP_CATALOG_SERVER', 'http://www.******.com');
  define('HTTPS_CATALOG_SERVER', 'https://www.******.com');
  define('ENABLE_SSL_CATALOG', true);


 

Share this post


Link to post
Share on other sites

In adition to this I had to add this to the .htaccess file to get all domin veriants to be SSL ie www.domain.com  .domain.com or http://www

all now redirect to https://www

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}


 

Share this post


Link to post
Share on other sites

If you are going to run the site in full ssl-mode, which you should, then you need to change your configure files. Any line containing SERVER', 'http should be changed to SERVER', 'https

Share this post


Link to post
Share on other sites

The problem then was the define('HTTP_COOKIE_DOMAIN.

You can set the HTTP_SERVER  and HTTP_CATALOG_SERVER to https to get all pages using ssl, thats no problem. it is recommended like Jack stated.

Share this post


Link to post
Share on other sites

Admin now working and 99% of store front, However when you go to a final product you still get insecure warning. So this will require editing every product to make sure all images are linked using https:/ not http. Or have I missed somthing?

image.png.abe58e4137017689f44b8fd81f8ae394.png


 

Share this post


Link to post
Share on other sites

All images should be included via "tep_image" function and all links should use the "tep_href_link" function. Then all should work correct and validate.

Some custom code or add ons may use "image src:..." and hardcoded links, change them to use the functions is better solution than change to hardcoded ssl.

Share this post


Link to post
Share on other sites

Yes database was imported from old 2.2a site and much of the product discription is html just using src= and most is from http links not https.

Will just have to live with that and update over time. Thanks


 

Share this post


Link to post
Share on other sites
  • Export database (product_description table only)
  • Edit in text editor.
  • Search and replace "http" by "https"
  • Save database table.
  • Import again.

All done in 10 min.

Share this post


Link to post
Share on other sites

×