SSL setup for API and Guzzle web - ja-guzzle/guzzle_docs GitHub Wiki
Generating and Setting up self signed certificates for Guzzle UI and Api app.
We can use the following command to generate our PKCS12 keystore:
keytool -genkeypair -alias justanalytics -keyalg RSA -keysize 2048 -storetype PKCS12 -keystore justanalytics.p12 -validity 3650
read more about self-signed certificate
Extract private key and certificate from PKCS12 file
openssl pkcs12 -in justanalytics.p12 -nocerts -out key.pem -nodes
openssl pkcs12 -in justanalytics.p12 -nokeys -out cert.pem
Add the following configuration in application.yml file in guzzle api and start api:
server:
...
ssl:
key-store-type: PKCS12
key-store: <key_store_path>/justanalytics.p12
key-store-password: <key_store_password>
key-alias: justanalytics
Install spa-http-server moudle in node js:
npm install spa-http-server -g
go to guzzle web directory and start http-server:
nohup http-server -p 8082 --push-state --ssl --cert <ssl_cert_path>/cert.pem --key <ssl_key_path>/key.pem &