azukaar / Cosmos-Server

☁️ The Most Secure and Easy Selfhosted Home Server. Take control of your data and privacy without sacrificing security and stability (Authentication, anti-DDOS, anti-bot)
https://cosmos-cloud.io
Other
2.99k stars 108 forks source link

Error configuring hostname #150

Closed laguill closed 7 months ago

laguill commented 7 months ago

What happened?

I made a mistake configuring a hostname. In fact I only wanted to try in local with my ip address

Now when I try to connect to ui with ip address of my server I get this error

Bad Request: Invalid hostname. Use your domain instead of your IP to access your server. Check logs if more details are needed.

How can I correct this ?

What should have happened?

.

How to reproduce the bug?

.

Relevant log output

.

Other details

.

System details

.

laguill commented 7 months ago

I also tried with localhost but I get the same error message

laguill commented 7 months ago

I replaced the localhost address by my server address I get this logs 2023/11/28 21:39:04 http: TLS handshake error from 192.168.2.224:38646: remote error: tls: unknown certificate 2023/11/28 21:39:11 http: TLS handshake error from 192.168.2.224:38656: remote error: tls: unknown certificate 2023/11/28 21:39:11 http: TLS handshake error from 192.168.2.224:38662: remote error: tls: unknown certificate 2023/11/28 21:39:11 "GET https://192.168.2.199/ HTTP/2.0" from 192.168.2.224:38676 - 307 46B in 27.435µs 2023/11/28 21:39:11 [ERROR] Invalid Hostname 192.168.2.199 for request. Expecting one of [192.168.1.199] : 2023/11/28 21:39:11 "GET https://192.168.2.199/cosmos-ui HTTP/2.0" from 192.168.2.224:38676 - 400 128B in 375.295µs 2023/11/28 21:39:32 [INFO] Metrics - Monitoring the server at /mnt/host 2023/11/28 21:40:02 [INFO] Metrics - Monitoring the server at /mnt/host 2023/11/28 21:40:32 [INFO] Metrics - Monitoring the server at /mnt/host 2023/11/28 21:41:02 [INFO] Metrics - Monitoring the server at /mnt/host 2023/11/28 21:41:32 [INFO] Metrics - Monitoring the server at /mnt/host 2023/11/28 21:42:02 [INFO] Metrics - Monitoring the server at /mnt/host 2023/11/28 21:42:32 [INFO] Metrics - Monitoring the server at /mnt/host 2023/11/28 21:43:02 [INFO] Metrics - Monitoring the server at /mnt/host 2023/11/28 21:43:32 [INFO] Metrics - Monitoring the server at /mnt/host 2023/11/28 21:44:02 [INFO] Metrics - Monitoring the server at /mnt/host

laguill commented 7 months ago

Fix by changing hostname by ip address of the server in this file sudo nano /var/lib/cosmos/cosmos.config.json