Nginx + Docker image

Hello, can you help me?
I set up syncloud docker image on my own server with a custom domain and c name record for apps. Use it with nginx. Platform works good but apps don’t open. How should I configure my nginx for DNS CNAME records for docker image?

docker image:

sudo docker run \
  --restart=always \
  --name=syncloud \
  --volume=/storage:/home/andrew/syncloud/external \
  --privileged \
  --detach=true \
  --publish=8443:443 \
  syncloud/platform-arm

nginx config:

server {
 listen 443 ssl http2;
 listen [::]:443 ssl http2;
 ssl on;
 ssl_certificate /etc/ssl/certs/cert.pem;
 ssl_certificate_key /etc/ssl/private/key.pem; 
 location / {
   proxy_pass https://localhost:8443;
   }
 }

Did you follow this instruction to create a wildcard cname record on your dns server?

What do you see when you install nextcloud and access by nextcloud.example.com? Is it still the main device Ui like on example.com or not?

Yes, I create CNAME records on my own DNS.

nextcloud.example.com same as example.com.

What do you see in browser when you open nextcloud.example.com?

I see the same thing as on exampe.com

That means you are probably losing the host header, try this:

proxy_set_header Host $host;
1 Like

Thank you, all works fine.