This site is powered by Drupal 10. I'm using Nginx as a web server and Let's Encrypt to add HTTPS encryption to my site. In this blog post, I will show you how my Nginx config file looks like.
My domain is gorannikolovski.com
All requests are redirected to the https-without-www version. That means that if a user types any of these:
he or she will be redirected to https://gorannikolovski.com
Here is my Nginx config file:
Code blocks that are commented with # managed by Certbot are automatically inserted by Certbot. Certbot is a tool that is installed on your server and by running one command:
you can choose domains for which you want to add Let's Encrypt HTTPS encryption. This is how that looks like:
Now, that's pretty cool.
Certbot will update your config files so that you don't have to manually do that. I'm using Ubuntu 20.04 on my server so I followed these instructions: ubuntubionic-nginx to install Certbot, but there are also instructions for many other systems.
About the Author
Goran Nikolovski is a senior web developer who loves working with Drupal, React, and React Native. He is the founder of this website and he enjoys sharing his knowledge. Need help with anything? Get in touch.