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
    • Cities
    • Lah!
    MPA And SMI to Co-fund Three Joint Industry-Research Consortiums To Develop And Pilot Electric Harbourcraft In Singapore
    • August 10, 2021
  • 2
    • Cities
    • Lah!
    • Technology
    ST Engineering’s IoT Solution To Monitor Performance Of Lifts In Singapore
    • September 16, 2021
  • 3
    • Lah!
    Best Air Purifiers For Your Home
    • September 25, 2019
  • 4
    • Lah!
    Coronavirus Outbreak: Singapore Introduces Additional Measures With DORSCON Orange
    • February 7, 2020
  • Sydney Opera House 5
    • Cities
    Splendid Structures of Sydney
    • February 23, 2024
  • 6
    • Technology
    UOB Taps Chronicle Software’s Solution For Its Electronic FX Pricing And Trade Engine To Help Customers Access More Competitive FX Pricing
    • June 3, 2021
  • 7
    • Technology
    NASA’s Plan To Build A Base Camp On The Moon Sounds Like Sci-Fi, But It’s Real
    • May 25, 2020
  • 8
    • Lah!
    • Technology
    Meet The 19 New Startups Accepted Into SMU Business Innovations Generator’s Second Cohort Of 2020
    • July 4, 2020
  • support group holding hands 9
    • People
    Drug And Alcohol Rehab Success Rates: Do They Really Work?
    • October 22, 2020
  • 10
    • Science
    • Technology
    Singapore Scientists Dissect RNA Structures Of SARS-COV-2 And Discover Important Host Factor For Infection
    • September 3, 2021
  • 11
    • Lah!
    • Technology
    SMU’s Centre For AI And Data Governance Launches New Research, Policy And Community Outreach Initiative To Improve Human-AI Exchanges
    • June 18, 2021
  • 12
    • Lah!
    ​Sea Level Could Rise By More Than 1 Metre By 2100 If Emission Targets Are Not Met, Reveals Survey Of 100 International Experts
    • May 12, 2020
Trending
  • 1
    Meralco PowerGen’s PacificLight starts up 100 MW fast-response plant in Singapore
    • June 20, 2025
  • 2
    A Father’s Day Gift for Every Pop and Papa
    • June 14, 2025
  • 3
    Apple services deliver powerful features and intelligent updates to users this autumn
    • June 12, 2025
  • 4
    Apple supercharges its tools and technologies for developers to foster creativity, innovation, and design
    • June 11, 2025
  • 5
    It’s time to stop debating whether AI is genuinely intelligent and focus on making it work for society
    • June 8, 2025
  • 6
    PBBM asks Singapore to invest more in PH renewable energy projects
    • June 6, 2025
  • 7
    Singapore PM Wong arrives in Malacañang
    • June 4, 2025
  • 8
    Renewable energy, carbon credits are priority areas of cooperation for Singapore, Philippines: Lawrence Wong
    • June 4, 2025
  • 9
    Singapore businesses eye more investments in PH, says PM Wong
    • June 4, 2025
  • 10
    The Summer Adventures : Hiking and Nature Walks Essentials
    • June 3, 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.