Posts

Showing posts with the label ssl

Install the Commodo SSL cert

Combine everything for nginx  [2] : Combine the above crt files into a bundle (the order matters, here): cat www_example_com.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt > ssl-bundle.crt Store the bundle wherever nginx expects to find it: mkdir -p /etc/nginx/ssl/example_com/ mv ssl-bundle.crt /etc/nginx/ssl/example_com/ Ensure your private key is somewhere nginx can read it, as well.: mv example_com.key /etc/nginx/ssl/example_com/ Make sure your nginx config points to the right cert file and to the private key you generated earlier: server { listen 443; ssl on; ssl_certificate /etc/nginx/ssl/example_com/ssl-bundle.crt; ssl_certificate_key /etc/nginx/ssl/example_com/example_com.key; # side note: only use TLS since SSLv2 and SSLv3 have had recent vulnerabilities ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # ... } Restart nginx.

convert certificate to different formats

Convert CER to PFX in OpenSSL OpenSSL runs from the command line, so you have to open a terminal window. In Linux, you do that with the keyboard shortcut  Ctrl + Alt + F1  or  Ctrl + Alt + T . Windows 10 users should open the  Run  box in their menu, type  CMD  into the box, and then click  Ctrl + Shift + Enter  to run the command prompt as an administrator. After you have the command prompt, type the command to turn yours.CER file and it's associated.KEY file into a PFX. The syntax looks like this: openssl pkcs12 -export -in yourcertificate.cer -inkey yourkey.key -out yourcertificate.pfx You replace "yourcertificate" and "yourkey" with the correct filenames for your actual certificate, and when you click OpenSSL, it creates the PFX file. You can also go the other way from .PFX to .CER by reversing the filenames. The same technique works for changing a certificate's filename extension. You can convert .PEM to .CRT or .CRT to...

Generate SSL

To generate SSL for a website login to that server through SSH During SSL installation write common name to be domain.com do not add www to it. replace bum.com with your domain on /mnt create a folder with domain name(This is done to generate certificate easily after expiration) [root@india bum.com]# openssl req -newkey rsa:2048 -nodes -keyout bum.com.key -out bum.com.csr Generating a 2048 bit RSA private key ........................+++ .....................+++ writing new private key to 'bum.com.key' ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [GB]:IN State or Province Name (full name) [Berkshire]:Jharkhand Locality Na...

SSL force redirection to https

If ssl is not working even after install check with ​ www.whynopadlock.com​ and find the reasons Login to whm using ssh root and password from atlas Then search ssl in whm and select manage autossl and select let’s encrypt Forced SSL redirection through virtualmin Ip:10000 Go to webmin and then webmin configuration then select SSL encryption Redirect non-SSL requests to SSL mode? Add it in nginx config Cd /etc/nginx niginx.conf if ($scheme = http) {return 301 https://solarkart.ezysolare.com$request_uri; } Redirect All HTTP server {     listen 80 default_server;     server_name _;     return 301 https://$host$request_uri; } for Apache <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTPS} !=on RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [L,R=301] </IfModule> #N WordPress RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !...