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

Meralco PowerGen’s PacificLight starts up 100 MW fast-response plant in Singapore

  • dotlah.com
  • June 20, 2025


Trending
  • 1
    • Technology
    thyssenkrupp Elevator Provides Free Cloud-based Digital Solution During COVID-19 Pandemic To Healthcare Facilities
    • June 26, 2020
  • 2
    • Cities
    Real Estate Trends In Texas For 2020
    • January 21, 2020
  • 3
    • Cities
    U.S. States Offering The Most Coronavirus Support
    • May 6, 2020
  • Bluetooth speakers 4
    • Gears
    Best Bluetooth Speakers Under $200 (2025 Edition)
    • October 16, 2025
  • 5
    • People
    Putting People At The Centre Of The Green Transition
    • January 20, 2024
  • 6
    • Cities
    • World Events
    The Biggest Ammonium Nitrate Explosions Since 2000
    • August 11, 2020
  • 7
    • People
    Here Are 6 Lessons Social Entrepreneurs Learned About Creating Systems Change
    • January 25, 2020
  • 8
    • Cities
    • People
    What Do Smart Cities Mean For Healthcare And Nursing?
    • March 11, 2020
  • 9
    • Science
    • Technology
    New Quantum Magnet Unleashes Electronics Potential
    • July 27, 2023
  • 10
    • Lah!
    SG Clean Ambassadors Network Launched To Promote The Adoption Of 7 Habits Of Good Public Hygiene, New Social Norms For Different Settings, And Safe Distancing Requirements
    • April 1, 2020
  • 11
    • Lah!
    • Technology
    Scientific Research Shows Customised Innovations Can Reduce The Risk Of COVID-19 Transmission
    • February 28, 2021
  • goswifties-swedish-meatballs-food 12
    • Featured
    • Food
    Fuel Your Eras Tour Fun: Must-Try Swedish Foods for Swifties in Stockholm
    • May 21, 2024
Trending
  • 1
    Why climate summits fail – and three ways to save them
    • October 21, 2025
  • Bluetooth speakers 2
    Best Bluetooth Speakers Under $200 (2025 Edition)
    • October 16, 2025
  • 3
    Apple Vision Pro upgraded with the powerful M5 chip and comfortable Dual Knit Band
    • October 15, 2025
  • 4
    Apple unveils new 14‑inch MacBook Pro powered by the M5 chip, delivering the next big leap in AI for the Mac
    • October 15, 2025
  • 5
    Apple introduces the powerful new iPad Pro with the M5 chip
    • October 15, 2025
  • 6
    Singapore’s national identity excludes those who don’t look like a ‘regular family’
    • October 9, 2025
  • Smart Watch 7
    Best Smartwatches, Your Gateway to Health Monitoring and Everyday Use
    • October 5, 2025
  • Cooking pots and pans 8
    Best Pots and Pans 2025: All-Season, All-Purpose Picks for Every Kitchen
    • September 23, 2025
  • 9
    Politicians love comparing NZ’s economy to Singapore or Ireland – but it’s simplistic and misleading
    • September 21, 2025
  • Kitchen Knives - Best All-Around Picks in 2025 10
    Kitchen Knives : The Surgeons of Cooking – Best All-Around Picks in 2025
    • September 15, 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.