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

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

  • dotlah.com
  • June 20, 2025
View Post
  • Technology

Apple services deliver powerful features and intelligent updates to users this autumn

  • Dean Marc
  • June 12, 2025
View Post
  • Artificial Intelligence
  • Machine Learning
  • Technology

Apple supercharges its tools and technologies for developers to foster creativity, innovation, and design

  • Dean Marc
  • June 11, 2025
View Post
  • Technology
  • Working Life

It’s time to stop debating whether AI is genuinely intelligent and focus on making it work for society

  • dotlah.com
  • June 8, 2025
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


Trending
  • 1
    • Technology
    6 Ways Cloud Computing Improves Government Services
    • July 5, 2019
  • 2
    • Cities
    • Lah!
    LTA Buys 40 New Trains For The North-South And East-West Lines
    • September 29, 2020
  • 3
    • Lah!
    Six Inspirational Works Make The Shortlist For S$50,000 NUS Singapore History Prize
    • July 13, 2021
  • 4
    • People
    Improving Your Health: Tips from a Fellow Filipino BPO Employee
    • January 21, 2020
  • 5
    • Lah!
    NTU EcoLabs Launches Multi-million Scale-up Initiative To Support 40 Cleantech Maritime Start-ups And SMEs
    • August 4, 2020
  • 6
    • Cities
    • Lah!
    IMDA Collaborates With Industry To Help Singaporeans Continue To Enjoy A High Quality Of Life From Home With Digital Tech Amid COVID-19
    • March 26, 2020
  • Microsoft. Windows 7
    • Artificial Intelligence
    • People
    • Technology
    Ousted Sam Altman To Lead New Microsoft AI Team
    • November 20, 2023
  • 8
    • Cities
    Coronavirus Wreaks Havoc On Economic Growth Prospects
    • June 18, 2020
  • covid19 testing 9
    • People
    • World Events
    New Report Gives Covid-19 Testing Strategies To Help America’s Communities Open Safely
    • September 28, 2020
  • 10
    • Cities
    • Politics
    Singapore businesses eye more investments in PH, says PM Wong
    • June 4, 2025
  • 11
    • Lah!
    More Than 1,600 Premises Team Up With NEA To Say YES To Waste Less
    • June 11, 2019
  • White sofas with curtains blowing 12
    • Cities
    A City Dweller’s Guide To Loft Spaces
    • April 27, 2021
Trending
  • Camping 1
    The Summer Adventures : Camping Essentials
    • June 28, 2025
  • 2
    Meralco PowerGen’s PacificLight starts up 100 MW fast-response plant in Singapore
    • June 20, 2025
  • 3
    A Father’s Day Gift for Every Pop and Papa
    • June 14, 2025
  • 4
    Apple services deliver powerful features and intelligent updates to users this autumn
    • June 12, 2025
  • 5
    Apple supercharges its tools and technologies for developers to foster creativity, innovation, and design
    • June 11, 2025
  • 6
    It’s time to stop debating whether AI is genuinely intelligent and focus on making it work for society
    • June 8, 2025
  • 7
    PBBM asks Singapore to invest more in PH renewable energy projects
    • June 6, 2025
  • 8
    Singapore PM Wong arrives in Malacañang
    • June 4, 2025
  • 9
    Renewable energy, carbon credits are priority areas of cooperation for Singapore, Philippines: Lawrence Wong
    • June 4, 2025
  • 10
    Singapore businesses eye more investments in PH, says PM Wong
    • June 4, 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.