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
    • Lah!
    LTA Pilots New Initiative To Help Commuters With Invisible Medical Conditions
    • October 3, 2019
  • 2
    • Environment
    • People
    • World Events
    The Deadliest Pandemics In Human History
    • January 29, 2020
  • 3
    • Cities
    Electrification May Cut European Household Energy Bills In Half
    • October 19, 2023
  • 4
    • Cities
    • Lah!
    LTA To Deploy Three-Door Double-Deck Buses From 2021
    • January 14, 2021
  • 5
    • Lah!
    SMU Lee Kong Chian School Of Business Climbs 16 Spots In Financial Time’s Masters In Management Ranking
    • September 29, 2020
  • 6
    • Cities
    • Lah!
    Singapore Airlines First In World To Pilot IATA’s Travel Pass App
    • March 10, 2021
  • 7
    • Society
    What Are Viruses Anyway, And Why Do They Make Us So Sick? 5 Questions Answered
    • February 28, 2020
  • 8
    • Lah!
    • Technology
    New Blockchain For Trade & Connectivity Network Will Assure Reliable Supply Chains And Strengthen Trust In Singapore As A Global Trading Hub
    • December 9, 2020
  • 9
    • Lah!
    • Technology
    Computer Model To Reduce COVID-19 Infections And Deaths
    • September 19, 2021
  • 10
    • Technology
    ABB Powers Singapore’s Digital Economy
    • August 12, 2019
  • 11
    • Science
    • Technology
    A Tale Of ‘Trons’: The Suffix That Tells The Story Of Modern Science
    • November 18, 2019
  • 12
    • Cities
    • Lah!
    Additional $120 Million To Help Taxi And Private Hire Car Drivers Affected By Covid-19
    • March 27, 2020
Trending
  • 1
    The Summer Adventures : Hiking and Nature Walks Essentials
    • June 3, 2025
  • 2
    Trump’s global trade plans are in disarray, after a US court ruling on ‘Liberation Day’ tariffs
    • May 29, 2025
  • 3
    315,000 Singaporeans have used new career and skills planning tool by SkillsFuture Singapore
    • May 23, 2025
  • college-of-cardinals-2025 4
    The Definitive Who’s Who of the 2025 Papal Conclave
    • May 8, 2025
  • conclave-poster-black-smoke 5
    The World Is Revalidating Itself
    • May 7, 2025
  • oracle-ibm 6
    IBM and Oracle Expand Partnership to Advance Agentic AI and Hybrid Cloud
    • May 6, 2025
  • 7
    Conclave: How A New Pope Is Chosen
    • April 25, 2025
  • 8
    Canonical Releases Ubuntu 25.04 Plucky Puffin
    • April 17, 2025
  • 9
    Mathematicians uncover the logic behind how people walk in crowds
    • April 3, 2025
  • 10
    Tokyo Electron and IBM Renew Collaboration for Advanced Semiconductor Technology
    • April 2, 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.