I have successfully installed and am running Nextcloud in docker. The installation uses LetsEncrypt to generate the certificates and runs without problems when I access it using HTTP.
When I attempt to use HTTPS, however, I am getting 500 Internal Server Error.
Researching this problem, I have learned that by default the nginx proxy container is not actually configured to use HTTPS (based on various nextcloud descriptions I have read online). Apparently what has to be done is to configure it to be able to use SSL.
Trouble is, there is no step by step procedure given for doing this.
Just about everywhere I look I am finding plenty of tutorials and instructions that include “set up letsencrypt” or "place certs in using certbot or other methods. This is nice but the docker-compose.yml file I used already sets up the certs! What I need is some clear instructions on how to configure the nginx-proxy to use SSL. I have been unable to find such instructions.
Can someone tell me how to properly configure the nginx-proxy container to use SSL? Or failing that, can someone point me to some clear instructions for properly configuring it for SSL?
While the answer above given y Alexandre is a good one (I gave it a point for the effort and it does work), I ended up solving my problem by writing my own reverse proxy server. This server is specifically designed for Nextcloud and runs well in a Docker container. It requires little configuration and is easier to set up and use than an nginx proxy. It works with SSL and acts as a good security layer in from of Nextclud.
Reverse proxies are easy to make using various frameworks. Once I decided to go that route it took less than three hours to make this one for Nextcloud.
If there is interest I will be happy to share the code and container.