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
View Post
  • Artificial Intelligence
  • Technology

How AI can accelerate the energy transition, rather than compete with it

  • dotlah.com
  • November 19, 2025
View Post
  • Gears
  • Technology

Apple Vision Pro upgraded with the powerful M5 chip and comfortable Dual Knit Band

  • Dean Marc
  • October 15, 2025
View Post
  • Gears
  • Technology

Meet Samsung Galaxy Tab S11 Series: Packing Everything You Expect From a Premium Tablet

  • Dean Marc
  • September 4, 2025
View Post
  • Technology

Malaysia’s ‘ASEAN Shenzhen’ needs some significant legal reform to take off — here’s how

  • dotlah.com
  • August 25, 2025
View Post
  • Gears
  • Technology

Samsung Electronics Debuts Odyssey G7 Monitors, Showcasing Top Games on Its Displays at Gamescom 2025

  • Dean Marc
  • August 20, 2025
View Post
  • Artificial Intelligence
  • Technology

Thoughts on America’s AI Action Plan

  • Dean Marc
  • July 24, 2025
View Post
  • Technology

ESWIN Computing launches the EBC77 Series Single Board Computer with Ubuntu

  • dotlah.com
  • July 17, 2025
View Post
  • Gears
  • Technology

Samsung Galaxy Z Fold7: Raising the Bar for Smartphones

  • Dean Marc
  • July 9, 2025


Trending
  • 1
    • Lah!
    Singapore’s First Virtual Power Plant To Optimise Energy Distribution
    • October 8, 2019
  • 2
    • Cities
    Raising The Bar For Smart Cities In Singapore
    • February 26, 2017
  • 3
    • Technology
    Why Robots Are A Game-Changer During And Post-Pandemic
    • November 14, 2021
  • 4
    • Cities
    • Lah!
    Sembcorp Industries Launches Singapore’s First Sustainable Financing Framework For The Energy Sector
    • August 31, 2021
  • 5
    • Lah!
    Singapore Named “Best Seaport – Asia” For The 32nd Time
    • November 15, 2020
  • 6
    • Lah!
    More Than 5,000 Premises Certified SG Clean Since The Launch Of The Campaign
    • March 15, 2020
  • We are all collateral damage 7
    • People
    From Suffering To Uprising. The Inevitability Of Violent Protests In Societies We Are Creating.
    • July 1, 2023
  • construction-site-john-cameron-rxgbUWacgl0-unsplash 8
    • Cities
    What Are The Biggest Health And Safety Concerns On An Urban Construction Site?
    • February 13, 2021
  • 9
    • Lah!
    • Technology
    Deloitte And NTU Singapore Launch New Course In Audit Analytics To Build Capabilities In Accountants Of The Future
    • June 9, 2020
  • work-from-home-child-charles-deluvio-rA83MmTX46U-unsplash 10
    • Features
    • People
    Four Things Workers Want Implemented By Their Bosses Post-Pandemic
    • May 31, 2021
  • 11
    • Lah!
    Half Of Singapore-based Companies Impacted By Fraud Lost At Least US$ 1 Million
    • March 9, 2020
  • 12
    • Cities
    • Environment
    • People
    Is Your City Making You Fat? How Urban Planning Can Address The Obesity Epidemic
    • February 24, 2020
Trending
  • Zed Approves | 48 Highly Rated Black Friday Deals in 2025 1
    Zed Approves | 48 Highly Rated Black Friday Deals in 2025
    • November 28, 2025
  • Points, Lines and a Question 2
    What Is The Point In Making Points?
    • November 27, 2025
  • 3
    This year’s climate talks saw real progress – just not on fossil fuels
    • November 24, 2025
  • Early Black Friday Deals - Hero image 4
    Zed Approves | More Early Black Friday 2025 Deals You Can’t Miss
    • November 22, 2025
  • 5
    How AI can accelerate the energy transition, rather than compete with it
    • November 19, 2025
  • 6
    Five key issues at the UN climate summit in Brazil – and why they matter to you and the planet
    • November 15, 2025
  • 7
    ASEAN takes major step toward landmark digital economy pact
    • November 8, 2025
  • 8
    We must empower local leaders to meet global goals – here’s why
    • November 4, 2025
  • Halloween Deals 9
    31 Spooky Deals for October 31! Halloween Specials!
    • October 31, 2025
  • 2025 Laptop Buyer’s Guide: Best Value and Performance Picks 10
    2025 Laptop Buyer’s Guide: Best Value and Performance Picks
    • October 28, 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.