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

Here’s how to get the $7 trillion AI hardware buildout right

  • dotlah.com
  • April 18, 2026
totus-technologies-cover
View Post
  • Business
  • Technology
  • World Events

The Transatlantic Tech Rift and Why Data Sovereignty Is the New Industrial Imperative

  • Ackley Wyndam
  • April 16, 2026
View Post
  • Technology

Hon Hai Technology Group (Foxconn) Recognized As Top 100 Global Innovators 2026

  • Dean Marc
  • April 9, 2026
View Post
  • Artificial Intelligence
  • Technology

Kioxia Announces New SSD Model Optimized for AI GPU-Initiated Workloads

  • Dean Marc
  • March 17, 2026
View Post
  • Artificial Intelligence
  • Technology

U.S. Ski & Snowboard and Google Announce Collaboration to Build an AI-Based Athlete Performance Tool

  • Dean Marc
  • February 8, 2026
View Post
  • Artificial Intelligence
  • Technology

IBM to Support Missile Defense Agency SHIELD Contract

  • Dean Marc
  • February 5, 2026
Smartphone hero image
View Post
  • Gears
  • Technology

Zed Approves | Smartphones for Every Budget Range

  • Ackley Wyndam
  • January 29, 2026
View Post
  • People
  • Technology

This is what the new frontier of AI-powered financial inclusion looks like

  • dotlah.com
  • January 2, 2026


Trending
  • 1
    • Science
    • Technology
    NUS Researchers Find Potential Solution To Overheating Mobile Phones
    • December 13, 2019
  • 2
    • Cities
    • Technology
    Sembcorp Industries, Chiyoda Corporation And Mitsubishi Corporation Sign MOU To Explore Supply Chain Commercialisation Of Decarbonised Hydrogen Into Singapore
    • October 5, 2021
  • 3
    • Technology
    Swift Programming Language Is Now Top Tier
    • March 27, 2018
  • 4
    • Cities
    • Society
    Wuhan, The Coronavirus And The World: Thinking Beyond Isolation
    • February 3, 2020
  • 5
    • Science
    Singapore Scientists Develop Advanced Human Liver Organoids
    • July 17, 2020
  • 6
    • Cities
    The Best U.S. States For Remote Work
    • May 12, 2020
  • 7
    • Technology
    Big Tech Antitrust Hearings, A NOT Wallstreet Or Mainstreet Viewpoint
    • August 3, 2020
  • 8
    • Lah!
    New NEA Facility To Boost Production Of Male Wolbachia-Aedes Aegypti Mosquitoes To Benefit More Residents
    • December 3, 2019
  • graduates-university-vasily-koloda-8CqDvPuo_kI-unsplash 9
    • People
    • World Events
    4 Trends That Will Shape The Future Of Higher Education
    • February 11, 2022
  • 10
    • Lah!
    • Technology
    Cisco And NUS Launch S$54 Million Corporate Laboratory To Boost Innovation And Research And Accelerate Singapore’s Digital Economy
    • November 7, 2021
  • support group holding hands 11
    • People
    Drug And Alcohol Rehab Success Rates: Do They Really Work?
    • October 22, 2020
  • insurance-policy-pexels-vlad-deep-10341357 12
    • Cities
    • People
    Why South Carolina Has Some of the Worst Drivers (and How It Impacts Car Insurance Rates)
    • June 27, 2023
Trending
  • Illustration of data storage 1
    The Splinternet Comes for European Supply Chains Why Fragmentation Is Now a Boardroom Problem
    • April 21, 2026
  • 2
    Here’s how to get the $7 trillion AI hardware buildout right
    • April 18, 2026
  • totus-technologies-cover 3
    The Transatlantic Tech Rift and Why Data Sovereignty Is the New Industrial Imperative
    • April 16, 2026
  • 4
    What will it take to get ships going through the Strait of Hormuz again?
    • April 13, 2026
  • 5
    Hon Hai Technology Group (Foxconn) Recognized As Top 100 Global Innovators 2026
    • April 9, 2026
  • 6
    3 lessons on the energy transition in an age of crisis
    • April 7, 2026
  • 7
    Samsung Unveils Galaxy A57 5G and Galaxy A37 5G, Packing Pro-Level Features at Awesome Price
    • March 25, 2026
  • 8
    The global price tag of war in the Middle East
    • March 24, 2026
  • 9
    Kioxia Announces New SSD Model Optimized for AI GPU-Initiated Workloads
    • March 17, 2026
  • Samsung Odyssey 10
    Samsung Showcases Glasses-Free 3D and HDR10+ GAMING With Acclaimed Game Titles at GDC 2026
    • March 9, 2026
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.