Redirect loop behind proxy

I have setup new self-installed seafile instace on MariaDB behind apache2 proxy

Because of only single public IP address I have to have this server behind another apache2 proxy that handles SSL redirects to server with seafile to http://newcloud.deymed.com

https -> ssl proxy server -> http seafile server

After many experiments I was not able to setup it correctly, it ends up in Redirect loop between ‘https://newcloud.deymed.com/’ and ‘https://newcloud.deymed.com/accounts/login/?next=/

loop can be seen here: http://prntscr.com/li8ofr

first apache ssl proxy config https://pastebin.com/MQMcRcVP

apache seafile proxy config https://pastebin.com/Mp6zjz7s
I was able to configure it accessing ip address of seafile server on port 8000. Seahub config:

SERVICE_URL https://newcloud.deymed.com

FILE_SERVER_ROOT https://newcloud.deymed.com/seafhttp