Generate ssl_certificate_key:
openssl genrsa -out server.key 4096

Create CSR request:
openssl req -new -key server.key -out domain.csr

Self-signed:
openssl req -x509 -new -key server.key -days 365 -out server.crt