Hosting Folder in the home directory using nginx
You don't need to add anything to nginx upon user creation. Simply use something like this in your server block:
location ~ ^/~(.+?)(/.*)?$ {
alias /home/$1/www$2;
autoindex on;
}
Check your distributions /etc/skel
if you mkdir /etc/skel/www all userdirs created by adduser (or your distributions adduser-script) will have this directory by default.