Initially the site was working under HTTP protocol and everything was fine. Then we bought an HTTPS certificate and tried to open the site through HTTPS. All the css and js were broken. I opened the page source code and saw that all these files are loaded through HTTP.
So, I opened /sites/default/settings.php. At first, I added
$conf['https'] = TRUE; but it didn't work. Then I commented out
//$base_url = 'http://sitename.com'; // NO trailing slash!
Afterward, both HTTP and HTTPS started to work.
Is it the correct way to solve the problem?