localhost certificates

Hello! When I create a Cardano node in the docker, it creates its self-signed certificate for localhost. If I do this on a server, how do I make a node create certificates for this server?

I built a node on a test server and when I use curl, that’s what comes in response

curl: (51) SSL: certificate subject name (localhost) does not match target host name ‘’

Curl has an option to ignore.