Admin Panel not loading after SSL is enabled.
Posted: Wed Jun 13, 2018 1:51 pm
I am using Opencart 2.3.0.2 version and trying to make the site work with SSL. I enabled SSL from the Admin > Setting > Server and enabled SSL setting. After that I modified URLs in the config.php file of admin folder:
// HTTP
define('HTTP_SERVER', 'http://www.siteurl.com/admin/');
define('HTTP_CATALOG', 'http://www.siteurl.com/');
define('HTTP_IMAGE', 'http://www.siteurl.com/image/');
// HTTPS
define('HTTPS_SERVER', 'https://www.siteurl.com/admin/');
define('HTTPS_CATALOG', 'https://www.siteurl.com/');
define('URL_CUTSHEET', 'https://www.siteurl.com/image/catalog/cutsheets/'); // custom variable to get cutsheet folder url
Then I modified config.php of the root directory.
// HTTP
define('HTTP_SERVER', 'http://www.siteurl.com/');
// HTTPS
define('HTTPS_SERVER', 'https://www.siteurl.com/');
define('URL_CUTSHEET', 'https://www.siteurl.com/image/catalog/cutsheets/'); // custom variable to get cutsheet folder url
After making these changes when I am trying to login to admin panel I am getting an error that "Site cannot be reached."
Also, when I change
define('HTTP_SERVER', 'http://www.siteurl.com/');
to
define('HTTP_SERVER', 'https://www.siteurl.com/');
The frontend CSS and JS files won't load and not loading the correct layout of the site.
Can you guys help me to get this working?
Thanks in Advance.
// HTTP
define('HTTP_SERVER', 'http://www.siteurl.com/admin/');
define('HTTP_CATALOG', 'http://www.siteurl.com/');
define('HTTP_IMAGE', 'http://www.siteurl.com/image/');
// HTTPS
define('HTTPS_SERVER', 'https://www.siteurl.com/admin/');
define('HTTPS_CATALOG', 'https://www.siteurl.com/');
define('URL_CUTSHEET', 'https://www.siteurl.com/image/catalog/cutsheets/'); // custom variable to get cutsheet folder url
Then I modified config.php of the root directory.
// HTTP
define('HTTP_SERVER', 'http://www.siteurl.com/');
// HTTPS
define('HTTPS_SERVER', 'https://www.siteurl.com/');
define('URL_CUTSHEET', 'https://www.siteurl.com/image/catalog/cutsheets/'); // custom variable to get cutsheet folder url
After making these changes when I am trying to login to admin panel I am getting an error that "Site cannot be reached."
Also, when I change
define('HTTP_SERVER', 'http://www.siteurl.com/');
to
define('HTTP_SERVER', 'https://www.siteurl.com/');
The frontend CSS and JS files won't load and not loading the correct layout of the site.
Can you guys help me to get this working?
Thanks in Advance.