www.hostingseekers.com
To Install OPenSSL You need to Access/open your terminal. Then Run: sudo apt-get update. And Finally Install OpenSSL through sudo apt-get install openssl
To generate Private key to Run: openssl genrsa -out mydomain.key 2048 This creates a 2048-bit private key.
To create a certificate Signing Request (CSR) you can Run: openssl req -new -key mydomain.key -out mydomain.csr and then Fill in your domain information.
To obtain SSL certification you can follow the below steps; 1st Option: You can get certificate from a Certificate Authority (CA) (e.g., Let’s Encrypt). 2nd Option: Design and create a self-signed certification also you can run code: openssl x509 -req -days 365 -in mydomain.csr -signkey mydomain.key -out mydomain.crt
Add <VirtualHost *:443> ServerName www.mydomain.com SSLEngine on SSLCertificateFile /path/to/mydomain.crt SSLCertificateKeyFile /path/to/mydomain.key </VirtualHost>
Visit https://www.mydomain.com Look for the padlock icon in the browser.
Common Issues: Certificate not trusted: Check CA root certificate. Browser warnings: Verify certificate details and configuration. Logs: Apache: /var/log/apache2/error.log