Server - Contents

Part B: Re-configuring Nginx for SSL

updated:14-Jan-2022

i. For Basic HTML Website on Nginx

One file related to Nginx need changes.

Original: myexample.com.conf (see BasicSite-d.Example)

server {
  listen 80;
  listen [::]:80;
  server_name example.com www.example.com;
  root /var/www/example.com;
  index index.html;
  location / {
    try_files $uri $uri/ =404;
 }
} 

This is modified to example1.com.conf:

Note the similarity of the last lines (italics) of the before and after modified file: example.com.conf  One would similarity place the last lines of those configurations for Flask or PHP-enabled sites.
Note:
1. Be sure to restart the Nginx webserver.
2. It is often necessary to clear the browser's cache, to affirm that the certificate is active.

Test the configuration at: sslshopper.com

Certbot-SSL Certbot-Extras