Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ringsaturn/4fbd116ad286fd043034782a06171e3f to your computer and use it in GitHub Desktop.
Save ringsaturn/4fbd116ad286fd043034782a06171e3f to your computer and use it in GitHub Desktop.
Install SSL certificate in Nginx (Using .crt & .ca-bundle certificate files)
Step 1 - Create .crt file
cat domainname.crt domainname.ca-bundle > domainname-ssl-bundle.crt
Step 2-
Add lines for ssl_certificate in nginx configuration
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
listen 443 ssl;
ssl_certificate /etc/ssl/certs/domainname-ssl-bundle.crt;
ssl_certificate_key /etc/ssl/private/domainname.key;
ssl_session_timeout 5m;
ssl_protocols SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
ssl_prefer_server_ciphers on;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment