by Matt T.
in despite of the case all setting for https are done AND that I try to connect in HTTPS.
I don't understand this. What is the error message you get, precisely, when you visit https://yoursite and not http://yoursite
Have you changed $CFG->wwwroot in config.php to begin with https:// and not http://?
You shouldn't really enable force https until you can actually get your site working on https.
After that you need to set up a redirect in apache - so that http requests are redirected to https. You can do that a number of ways, but my preferred way is a rewrite in your apache vhost configuration files. Plenty of material available via google to learn how to do that.
If you are using https://www.<mysite> the following redirects should be put put in place
http://<mysite> should be redirected to https://www.<mysite>
http://www.<mysite> should be redirected to https://www.<mysite>
https://<mysite> should be redirected to https://www.<mysite>
If you use http://<mysite> (without www) - the following redirects should be put in place
http://www.<mysite> should be redirected to https://<mysite>
https://www.<mysite> should be redirected to https://<mysite>
http://<mysite> should be redirected to https://<mysite>
Then you can turn on force https, so that for some reason your redirect fails, Moodle refuses to continue unless guaranteed a secure connection.
Finally (and this is done absolutely last and after you have taken a full database dump backup - you've been warned). you should change all references on your site to http:// to https:// to avoid mixed content problems. You use the admin screen at <yoursite>/admin/tool/replace/index.php to do this.
Bonus points afterwards is to enable HSTS, but that should only be done after a few months of running stable.