Install OpenSSL on Linux
Check-in terminal whether the Open SSL is installed or not.
if installed then run the below command
It will generate the localhost.key and localhost.crt file Only for One Month of Validation. You will need to regenerate the localhost.key and localhost.crt again.
Import SSL Certificate
Import the SSL certificate through a browser like (Chrome). Search the SSL keyword in the Chrome settings search bar.
Configure SSL in Nginx
Open-enabled site Configuration. Add the below line to the configuration. replace the path of localhost.crt and localhost.key in config.
And Restart the Nginx server.