After creating a website or a reverse proxy vhost through the configuration file, the vhost has to be enabled:
ln -s /etc/nginx/sites-available/my.domain.com /etc/nginx/sites-enabled/my.domain.com
You can test the configuration file using the following command:
nginx -t
Do not forget to restart NGINX for the changes to be applied:
systemctl restart nginx
ATTENTION:
Always activate the vhost before generating the let’s encrypt SSL certificates. Failure to do so will result in having the default configuration file to be used which might result in the creation of two different vhosts using the same domain name. This will lead to one configuration being skipped on NGINX startup.