Accessing openHAB’s dashboard redirects to same url

So, I stopped the Dr.Web service (which means port 3000 is available) and as additional directive (they get inclueded with include "/var/www/vhosts/system/oh.mydomain.com/conf/vhost_nginx.conf";) for mydomain.com I tried this

location /css {
	alias /var/www/vhosts/mydomain.com/oh.mydomain.com/public/css;
}
location /js {
	alias /var/www/vhosts/mydomain.com/oh.mydomain.com/public/js;
}
location /img {
	alias /var/www/vhosts/mydomain.com/oh.mydomain.com/public/img;
}
location /bootstrap {
	alias /var/www/vhosts/mydomain.com/oh.mydomain.com/public/bootstrap;
}
location /font-icons {
	alias /var/www/vhosts/mydomain.com/oh.mydomain.com/public/font-icons;
}
location /fonts {
	alias /var/www/vhosts/mydomain.com/oh.mydomain.com/public/fonts;
}
location /js-plugin {
	alias /var/www/vhosts/mydomain.com/oh.mydomain.com/public/js-plugin;
}
location /staff/js-plugin {
	alias /var/www/vhosts/mydomain.com/oh.mydomain.com/public/js-plugin;
}
location /downloads {
	alias /var/www/vhosts/mydomain.com/oh.mydomain.com/public/downloads;
}

location ~ /.well-known {
	allow all;
}

location ~ ^/(socket.io|rest|images|static|rrdchart.png|chart|openhab.app|WebApp|CMD|cometVisu|proxy|greent|jquery|classicui|ui|basicui|doc|start|icon|habmin|remote|habpanel|ifttt/v1/actions/command) {
	proxy_pass http://SERVER-IP:3000;
	proxy_redirect off;
	proxy_http_version 1.1;
	proxy_set_header Host $host;
	proxy_set_header Upgrade $http_upgrade;
	proxy_set_header Connection "upgrade";
	proxy_set_header X-Real-IP $remote_addr;
	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
	proxy_set_header X-Forwarded-Proto https;
}

location / {
    proxy_pass http://SERVER-IP:3000;
    proxy_redirect off;
    proxy_http_version 1.1;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto https;
}

And the additional directives for home.mydomain.com looks like this

location ~ /.well-known {
	allow all;
}

location / {
	proxy_pass http://<SERVER-IP>:3000;
	proxy_redirect off;
	proxy_http_version 1.1;
	proxy_set_header Host $host;
	proxy_set_header Upgrade $http_upgrade;
	proxy_set_header Connection "upgrade";
	proxy_set_header X-Real-IP $remote_addr;
	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
	proxy_set_header X-Forwarded-Proto https;
}

With this I get an “Bad Gateway 502” and proxy_access_ssl_log file shows this "GET /socket.io/?EIO=3&transport=websocket HTTP/1.1" 502 1005 "-" "okhttp/3.8.1"

If I remove this part from the mydomain.com config

location / {
    proxy_pass http://<SERVER-IP>:3000;
    proxy_redirect off;
    proxy_http_version 1.1;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto https;
}

the openhab cloud service page is shown but the locale instance will not be recognized as online.
proxy_access_ssl_log file still shows "GET /socket.io/?EIO=3&transport=websocket HTTP/1.1" 502 1005 "-" "okhttp/3.8.1"
proxy_error_log shows 2023/06/15 22:55:00 [error] 834848#0: *585874 connect() failed (111: Connection refused) while connecting to upstream, client: <HOME-IP>, server: oh.mydomain.com, request: "GET /socket.io/?EIO=3&transport=websocket HTTP/1.1", upstream: "http://<SERVER-IP>:3000/socket.io/?EIO=3&transport=websocket", host: "oh.mydomain.com"

openhab log of the local instance shows this [WARN ] [okhttp3.OkHttpClient ] - A connection to https://oh.mydomain.com/ was leaked. Did you forget to close a response body?

If I remove everything, in proxy_access_ssl_log file I get this

[15/Jun/2023:23:06:03 +0200] "GET / HTTP/1.1" 304 0 "https://oh.mydomain.com/" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/114.0"
[15/Jun/2023:23:06:04 +0200] "GET /js-plugin/jquery-cookie/jquery.cookie.js?_=1686863164177 HTTP/1.1" 200 768 "https://oh.mydomain.com/" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/114.0"
[15/Jun/2023:23:06:04 +0200] "GET /apple-icon.png HTTP/1.1" 499 0 "https://oh.mydomain.com/" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/114.0"

When the local instance gets recognized I get this in the openhab.log
2023-06-15 23:05:01.619 [INFO ] [io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = 2c...5a, base URL = http://localhost:8080)

But when clicking on the link to the dashboard I get “Bad Gateway 502”
and proxy_access_ssl_log file of home.mydomain.com shows
[15/Jun/2023:23:32:27 +0200] "GET / HTTP/1.1" 502 1005 "https://oh.mydomain.com/" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/114.0"

proxy_error_log of home.mydomain.com shows
2023/06/15 23:22:34 [error] 837299#0: *587035 connect() failed (111: Connection refused) while connecting to upstream, client: <HOME-IP>, server: home.mydomain.com, request: "GET / HTTP/1.1", upstream: "http://<SERVER-IP>:3000/", host: "home.mydomain.com", referrer: "https://oh.mydomain.com/"

Any ideas?

Best regards