Get SSL Certificates (Let's Encrypt) P.2

https://www.server-world.info/en/note?os=Ubuntu_20.04&p=nginx&f=3

[2]

Configure Nginx. For example, enable SSL/TLS on default site.

root@www:~# vi /etc/nginx/sites-available/default# add to the end # replace servername and path of certificates to your own one

root@www:~# systemctl restart nginx

[3]

If you'd like to set HTTP connection to redirect to HTTPS (Always on SSL/TLS), configure like follows.

root@www:~# vi /etc/nginx/sites-available/default# add into the section of listening 80 port

root@www:~# systemctl restart nginx

[4]

Verify to access to the test page from a client computer with a Web browser via HTTPS. If you set Always On SSL/TLS, access with HTTP to verify the connection is redirected to HTTPS normally, too.

Last updated