How openssl generate SSL self sign CSR using command line

1. openssl genrsa -out /etc/httpd/conf/ssl.key/server.key 2048

2. openssl req -new -newkey rsa:2048 -nodes -sha256 -keyout /etc/httpd/conf/ssl.key/server.key -out /etc/httpd/conf/ssl.crt/domain.name.csr

/httpd-vhost info also need to check

3. generate self sign ssl
openssl x509 -req -days 365 -in domain.name.csr -signkey server.key -out server.crt