To generate the Keystore and CSR file, refer to https://serverfault.com/questions/715827/how-to-generate-key-and-crt-file-from-jks-file-for-httpd-apache-server.
To extract the key from the keystore.jks file, execute the following commands:
The first command copies the key from your keystore to a new .p12 store. The second command extracts the key from the .p12 to a .key file for the NGINX configuration.
Configuring the Certificate on NGINX Server
The following figure illustrates on how to configure the certificate on NGINX server.
server.key files are configured in
- Execute the following command to export the .crt:
- Execute the following command to convert the certificate to PEM:
- Execute the following command to export the key:
- Execute the following command to convert the PKCS12 key to unencrypted PEM: