Problems while adding second domain-name

Hi! :slight_smile:

I added a second domain name for our nextcloud and want to redirect every traffic to the new domain.
It works fine, but collabora online doesn’t work if I do this. (doesn’t matter if I use the old or new domain-name in the nextcloud settings for collabora, but without the rewrite rule in the nginx.conf the old domain-name works well [the new one not])

I added the relevant part of my nginx.conf:
(secretdomain.de is only a placeholder)

upstream php-handler {
#    server 127.0.0.1:9000;
    server unix:/run/php/php7.4-fpm.sock;
}

server {
    listen 80;
    listen [::]:80;
    server_name speicherwolke.secretdomain.de nextcloud.secretdomain.de;
    # enforce https
    return 301 https://$server_name$request_uri;
    #return 301 https://speicherwolke.secretdomain$request_uri;
}


server {
    listen 443 ssl;
    listen [::]:443 ssl;
    server_name nextcloud.secretdomain.de;
    rewrite ^ $scheme://speicherwolke.secretdomain.de$request_uri permanent;
    #return 301 $scheme://speicherwolke.secretdomain.de$request_uri;
    ssl_certificate /etc/letsencrypt/live/nextcloud.secretdomain.de/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/nextcloud.secretdomain.de/privkey.pem;

}

server {
    listen 443 ssl;
    listen [::]:443 ssl;
    server_name speicherwolke.secretdomain.de nextcloud.secretdomain.de;
    ssl_certificate /etc/letsencrypt/live/nextcloud.secretdomain.de/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/nextcloud.secretdomain.de/privkey.pem;

# static files
    location ^~ /loleaflet {
        proxy_pass https://localhost:9980;
        proxy_set_header Host $http_host;

}
 # many other none relevant stuff here [...]

Does anyone have an idea where the problem is or even a solution?

Long greetings
Kevin

It’s working now.

Topic can be closed.

1 Like

So was that a temporary issue, and is solved without doing any modifications?