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!
    • Technology
    NUS Researchers Bring Attack-Proof Quantum Communication Two Steps Forward
    • July 9, 2021
  • hong-kong-mtr-cheung-yin-7PrfWLpoPSs-unsplash 2
    • Cities
    Top 10 Cities With The Best Public Transport
    • December 16, 2022
  • 3
    • Economy
    • People
    • World Events
    What Will The World Be Like After Coronavirus? Four Possible Futures
    • April 3, 2020
  • AI connections in space 4
    • Artificial Intelligence
    • Featured
    • Science
    • Technology
    Exploring the Hypothetical- Hyperintelligent Space Travel as Thought Experiment
    • July 11, 2023
  • 5
    • Lah!
    • Technology
    Autonomous Vehicle Testbed To Be Expanded To Western Singapore – Continued Emphasis On Public Safety
    • October 24, 2019
  • 6
    • Cities
    • Technology
    The Most Innovative Economies In The World
    • February 12, 2020
  • 7
    • Society
    Sunseap Group Chairman Mr Robert Yap Min Choy Named First-ever Dean’s Fellow At SMU School Of Information Systems
    • February 7, 2020
  • 8
    • Lah!
    • Technology
    Mapping The Undiscovered
    • August 24, 2021
  • 9
    • Lah!
    More Local Mixed-breed Dogs Can Be Rehomed To HDB Flats With The Revision In Size Limits Under Project ADORE
    • March 4, 2020
  • 10
    • Lah!
    Regenerating Nature In Our Built Environment
    • January 28, 2020
  • 11
    • Lah!
    5 Places To Hit Up For Singapore Flavours This August!
    • August 27, 2021
  • On AI Device Is Your AI 12
    • Artificial Intelligence
    • Technology
    Qualcomm Brings Industry-Leading AI Innovations and Broad Collaborations to CES 2025 Across PC, Automotive, Smart Home and Enterprises
    • January 7, 2025
Trending
  • 1
    Trump’s global trade plans are in disarray, after a US court ruling on ‘Liberation Day’ tariffs
    • May 29, 2025
  • 2
    315,000 Singaporeans have used new career and skills planning tool by SkillsFuture Singapore
    • May 23, 2025
  • college-of-cardinals-2025 3
    The Definitive Who’s Who of the 2025 Papal Conclave
    • May 8, 2025
  • conclave-poster-black-smoke 4
    The World Is Revalidating Itself
    • May 7, 2025
  • oracle-ibm 5
    IBM and Oracle Expand Partnership to Advance Agentic AI and Hybrid Cloud
    • May 6, 2025
  • 6
    Conclave: How A New Pope Is Chosen
    • April 25, 2025
  • 7
    Canonical Releases Ubuntu 25.04 Plucky Puffin
    • April 17, 2025
  • 8
    Mathematicians uncover the logic behind how people walk in crowds
    • April 3, 2025
  • 9
    Tokyo Electron and IBM Renew Collaboration for Advanced Semiconductor Technology
    • April 2, 2025
  • 10
    Tariffs, Trump, and Other Things That Start With T – They’re Not The Problem, It’s How We Use Them
    • March 25, 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.