I have an account in Jelastic and I want to force my site to work only over https. I've created environment nginx + php with nginx balancer and enabled Jelastic SSL (as it described [here](https://docs.jelastic.com/jelastic-ssl)). 

Whenever I tried to setup 301 redirect from http to https with no luck. Using mod\_rewrite didn't work for me, the only thing I've got is a loop redirect. Google didn't help. 

I really need advise. Any additional info will be provided. 

Thanks in advance.