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
    Discovering The Beauty In Digitalisation
    • August 31, 2021
  • City Of London 3D 2
    • Cities
    • Technology
    How 3D City Models Transform The Way We Design And Build Cities
    • November 14, 2020
  • 3
    • Cities
    The World’s Leading Financial Centres
    • April 17, 2020
  • 4
    • Lah!
    • Technology
    DBS Accelerates Trade Digitalisation Efforts With More ‘Industry-firsts’ To Drive Greater Efficiencies For Customers
    • March 4, 2020
  • 5
    • Cities
    • Lah!
    Sembcorp Opens Singapore’s First Solar-Powered EV Charging Hub
    • July 20, 2021
  • 6
    • Lah!
    • Technology
    World’s First Digital Trade Financing Pilot Between MLETR-Harmonised Jurisdictions
    • November 14, 2021
  • 7
    • Lah!
    • Technology
    Inaugural SFF x SWITCH Sees Over 60,000 Participants From 140 Countries; Event To Return On 9-13 November 2020
    • November 19, 2019
  • 8
    • Society
    Accomodating Workers Affected By Lockdown In Malaysia
    • March 17, 2020
  • 9
    • Science
    • Technology
    NUS Researchers Find Potential Solution To Overheating Mobile Phones
    • December 13, 2019
  • 10
    • Lah!
    • Society
    SMU Appoints New Dean For Business School
    • September 3, 2021
  • 11
    • Lah!
    PM Lee Hsien Loong on the Novel Coronavirus (nCoV) Situation in Singapore on 8 February 2020
    • February 8, 2020
  • 12
    • Technology
    MAS Partners With Financial Industry to Create Framework for Responsible Use of AI
    • November 13, 2019
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.