Website not opening via domain.com on additional server IP address

I recently added an additional IP address to my VPS but adding a domain to use the IP address throws an internal server error.

for example, after adding domain.com, accessing it via domain.com throws an Internal Server Error but if I open it like this: domain.com/index.html it works fine.

Note: The primary IP of the server works fine on domains when added.

Does anyone know how I can fix this problem?

This is the sort of error I get in the Error log

2023/05/30 11:42:12 [error] 270702#270702: *15231 connect() failed (110: Connection timed out) while connecting to upstream, client: 212.224.107.222, server: domain.com, request: "GET /about HTTP/1.1", upstream: "https://my_secondary_ip:8443/about", host: "domain.com"