Running letsencrypt and nginx in a docker, can't get to nextcloud


I’m running unRAID and have a docker with nginx and letsencrypt. In that docker I want to run nextcloud. The part where I’m failing is to get the reverse proxy running correctly. At the moment my browser would download an index.php file, but would not load the site.

This is my nginx config file: `server {
listen 80;

return 301 https://$server_name$request_uri;


server {
listen 443 ssl;
root /config/www/cloud;
access_log /var/log/nginx/;
error_log /var/log/nginx/;

client_max_body_size 0;
underscores_in_headers on;

ssl on;
ssl_certificate /config/keys/letsencrypt/fullchain.pem;
ssl_certificate_key /config/keys/letsencrypt/privkey.pem;

ssl_stapling on;
ssl_stapling_verify on;

location / {
	proxy_headers_hash_max_size 512;
	proxy_headers_hash_bucket_size 64;
	proxy_set_header Host $host;
	proxy_set_header X-Forwarded-Proto $scheme;
	proxy_set_header X-Real-IP $remote_addr;
	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

	add_header Front-End-Https on;


Is there anything wrong in my config file?

Thanks for any help!