2 nextcloud/certificates behind SWAG docker
Hello
I have a problem to configure nginx with two different domains.
I can’t find my problem so I’m going to explain my installation to you chronologically.
I installed docker swag/fail2ban/Dashboard with a first Nextcloud on a duckdns domain and letsencrypt certificate generate in my swag stack. all go well.
I bought another domain on OVH and I used certbot in console mode from portainer to generate my other letsencrypt certificate. I have two directories in /etc/letsencrypt/live/
one xxx.duckdns.org and another yyyy.fr
I managed to display my site yyyy.fr but without the https. I modified my yyy_subdomain.conf to add just after the include /config/nginx/ssl.conf; :
ssl_certificate /etc/letsencrypt/live/yyyy.fr/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/yyyy.fr/privkey.pem;
So I succeeded afterwards in displaying https://yyyy.fr but I now have a systematic redirection from https://xxx.duckdns.org to https://yyyy.fr
I then duplicate my two ssl.conf to have two other ssl_xxx_duckdns_org.conf and ssl_yyyy_fr.conf
I modified my two yyy_subdomain.conf and xxx_subdomain.conf to point the include /config/nginx/ssl_xxx_duckdns_org.conf; and include /config/nginx/ssl_yyyy_fr.conf;
But I still have the same redirect on my two Nextcloud instances.
I wonder if it’s not a problem with the Fastcgi cache?
If anyone has an idea I’m a taker.
Thanks in advance.