dotlah! dotlah!
  • Cities
  • Technology
  • Business
  • Politics
  • Society
  • Science
  • About
Social Links
  • zedreviews.com
  • citi.io
  • aster.cloud
  • liwaiwai.com
  • guzz.co.uk
  • atinatin.com
0 Likes
0 Followers
0 Subscribers
dotlah!
  • Cities
  • Technology
  • Business
  • Politics
  • Society
  • Science
  • About
  • Technology

How To Configure SSL In NGINX

  • February 1, 2018
Total
0
Shares
0
0
0

Before you begin

Prerequisites :

  • Must have the certificates provided by the Certificate Authority
  • Must have the Private Key

Setup and Configure

1. Bundle the Certificate files received from CA

cat <ssl_certificate_from_ca> <intermediate_certificate_from_ca> >> <filename_bundled_ssl_certificate>

2. Upload the SSL Certificate Bundle and Private Key to the Server

scp <bundled_ssl_certificate> <user>@<host>:/home/ubuntu/
scp <private_key> <user>@<host>:/home/ubuntu/

3. SSH to the Server

$ ssh-add <private_key>;
$ ssh <user>@<host>;

4. Move the SSL Certificates to /etc/ssl

sudo mv /home/ubuntu/<bundled_ssl_certificate> /etc/ssl
sudo mv /home/ubuntu/<private_key> /etc/ssl

5. Change file permissions

sudo chmod 644 /etc/ssl/<bundled_ssl_certificate>
sudo chmod 644 /etc/ssl/<private_key>

6. Configure the Nginx configuration for your domain that will be using the SSL Certificates

sudo nano /etc/nginx/sites-available/default

  server {
    ...

    # Enter the following in the server block

    # ---------------
    # SSL
    # ---------------
    listen 443 ssl;

    ssl_certificate /etc/ssl/<bundled_ssl_certificate>;
    ssl_certificate_key /etc/ssl/<private_key>;

    # ----------------
    # Redirect to HTTPS
    # ----------------
    if ($scheme = 'http') {
      return 301 https://$host$request_uri;
    }

    ...
  }

Total
0
Shares
Share
Tweet
Share
Share
Related Topics
  • HTTPS
  • Security
  • SSL
majulah

Previous Article
  • Cities
  • Lah!

OneService App Turns Three!

  • January 23, 2018
View Post
Next Article
  • Cities
  • Lah!

Know Your Tree – NParks Launches Interactive Map Of Trees Across Singapore

  • February 5, 2018
View Post
You May Also Like
oracle-ibm
View Post
  • Artificial Intelligence
  • Technology

IBM and Oracle Expand Partnership to Advance Agentic AI and Hybrid Cloud

  • Dean Marc
  • May 6, 2025
View Post
  • Software
  • Technology

Canonical Releases Ubuntu 25.04 Plucky Puffin

  • Dean Marc
  • April 17, 2025
View Post
  • Artificial Intelligence
  • Technology

Tokyo Electron and IBM Renew Collaboration for Advanced Semiconductor Technology

  • Dean Marc
  • April 2, 2025
View Post
  • Artificial Intelligence
  • Technology

IBM contributes key open-source projects to Linux Foundation to advance AI community participation

  • dotlah.com
  • March 22, 2025
View Post
  • Artificial Intelligence
  • Technology

Mitsubishi Motors Canada Launches AI-Powered “Intelligent Companion” to Transform the 2025 Outlander Buying Experience

  • Dean Marc
  • March 10, 2025
View Post
  • Technology

New Meta for Education Offering is Now Generally Available

  • Dean Marc
  • February 26, 2025
View Post
  • Artificial Intelligence
  • Technology

Deep dive into AI with Google Cloud’s global generative AI roadshow

  • dotlah.com
  • February 18, 2025
View Post
  • Artificial Intelligence
  • Technology

How the UK’s plans for AI could derail net zero – the numbers explained

  • dotlah.com
  • February 9, 2025


Trending
  • 1
    • Climate Change
    • People
    How We Can Identify Climate-Vulnerable Neighbourhoods And Protect Inhabitants
    • January 27, 2024
  • 2
    • Lah!
    NEA Partners Schools In Larger Dengue Cluster Areas To Distribute Mosquito Repellent And Educational Materials To Students
    • August 20, 2020
  • 3
    • Cities
    Connected City Streets Mean Healthier Residents And Communities
    • September 7, 2020
  • city skyline sunset 4
    • Cities
    How Cities Can Combat The Dangerous Combination Of Extreme Heat And COVID
    • September 6, 2020
  • 5
    • Cities
    • People
    Only Eight Countries Have Full Equal Rights For Women
    • March 10, 2020
  • 6
    • Cities
    • People
    Which Countries Have The Richest Adults?
    • June 17, 2020
  • 7
    • Cities
    • Lah!
    AVS Seeks Public Feedback To Finalise Revised Licensing Conditions For Dog Breeders And Pet Boarders
    • July 7, 2021
  • 8
    • Lah!
    Explainer: Testing The Efficacy Of Protective Face Masks
    • August 28, 2020
  • zurich-thimo-pedersen-vQ9kKDptlj0-unsplash 9
    • Cities
    • People
    Switzerland Tops The Global Talent List Of 2020
    • June 3, 2021
  • covid19 mental health 10
    • People
    The Pandemic, US Elections, And Other Current Events – Taking Care Of Your Mental Health In These Trying Times
    • November 11, 2020
  • x.ai - Understand the universe 11
    • People
    • Technology
    Elon Musk’s New xAI Company Launches To ‘Understand The True Nature Of The Universe’
    • July 13, 2023
  • 12
    • Lah!
    • Technology
    DBS Launches Asia’s First Automated Digital Bond Issuance Platform
    • June 22, 2021
Trending
  • college-of-cardinals-2025 1
    The Definitive Who’s Who of the 2025 Papal Conclave
    • May 8, 2025
  • conclave-poster-black-smoke 2
    The World Is Revalidating Itself
    • May 7, 2025
  • oracle-ibm 3
    IBM and Oracle Expand Partnership to Advance Agentic AI and Hybrid Cloud
    • May 6, 2025
  • 4
    Conclave: How A New Pope Is Chosen
    • April 25, 2025
  • 5
    Canonical Releases Ubuntu 25.04 Plucky Puffin
    • April 17, 2025
  • 6
    Mathematicians uncover the logic behind how people walk in crowds
    • April 3, 2025
  • 7
    Tokyo Electron and IBM Renew Collaboration for Advanced Semiconductor Technology
    • April 2, 2025
  • 8
    Tariffs, Trump, and Other Things That Start With T – They’re Not The Problem, It’s How We Use Them
    • March 25, 2025
  • 9
    IBM contributes key open-source projects to Linux Foundation to advance AI community participation
    • March 22, 2025
  • PiPiPi 10
    The Unexpected Pi-Fect Deals This March 14
    • March 14, 2025
Social Links
dotlah! dotlah!
  • Cities
  • Technology
  • Business
  • Politics
  • Society
  • Science
  • About
Connecting Dots Across Asia's Tech and Urban Landscape

Input your search keywords and press Enter.