Cant find and login in to homeserver : URL does not appear to be a valid Matrix homeserver
-
Hello, I set up a server on the local network, if I go through the web interface (https://matrix.test.rus), then I get to the server without problems, if the desktop client Element or some other is used, I get an error: URL does not appear to be a valid Matrix homeserver
What could be the problem ?
config:
server {
listen 80;
listen [::]:80;
server_name matrix.test.rus;location /.well-known/matrix/client { return 200 '{"m.homeserver": {"base_url": "https://matrix.test.rus"}}'; default_type application/json; add_header Access-Control-Allow-Origin *; } # Redirect all HTTP requests to HTTPS with a 301 Moved Permanently response.
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;listen 8448 ssl http2 default_server; listen [::]:8448 ssl http2 default_server; server_name matrix.test.rus; ssl_certificate /etc/ssl/private/matrix.crt; ssl_certificate_key /etc/ssl/private/matrix.key; ssl_session_timeout 1d; ssl_session_cache shared:SSL:50m; ssl_session_tickets off; ssl_protocols TLSv1.2 TLSv1.3; ssl_prefer_server_ciphers on; root /var/www/element; index index.html; location /.well-known/matrix/client { return 200 '{"m.homeserver": {"base_url": "https://matrix.test.rus"}}'; default_type application/json; add_header Access-Control-Allow-Origin *; } location /_matrix { proxy_pass http://localhost:8008; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $host; client_max_body_size 50M; }
}
-
Test your server (base domain like test.rus, not matrix server location) with https://federationtester.matrix.org/ for configuration errors. I guess you forgot to set the well-known within Cloudrons domain configuration like @nebulon pointed out already. Should look like this: