Skip to content

Instantly share code, notes, and snippets.

@mindscms
Created December 7, 2021 18:41
Show Gist options
  • Save mindscms/528c30e941d28d1b45058f8c0bbf6280 to your computer and use it in GitHub Desktop.
Save mindscms/528c30e941d28d1b45058f8c0bbf6280 to your computer and use it in GitHub Desktop.
## Don't forget to change localhost to your local domain in (server_rootCA.csr.cnf & v3.ext)
## (( ONLY )) In localhost, you have need to change SSLCertificateFile & SSLCertificateKeyFile in vhosts-ssl.conf to new generated server.crt & server.key
## In other domains, you need to configure httpd-vhost.conf only.
# openssl genrsa -out server_rootCA.key 2048
# openssl req -x509 -new -nodes -key server_rootCA.key -sha256 -days 3650 -out server_rootCA.pem
# openssl req -new -sha256 -nodes -out server.csr -newkey rsa:2048 -keyout server.key -config server_rootCA.csr.cnf
# openssl x509 -req -in server.csr -CA server_rootCA.pem -CAkey server_rootCA.key -CAcreateserial -out server.crt -days 3650 -sha256 -extfile v3.ext
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment