How to force Nginx to redirect site name without-www to ‘www’

If you have a domain, ‘example.com’ and you want it to be available both when a user enters, ‘http://example.com’ and ‘http://www.example.com’, and you are running Nginx on your server, you can do so by updating the Nginx conf file for that Site. This file can usually be found in /etc/nginx/sites-available/ folder. Open the file and …