This yocto recipe appends @arut's nginx-ts-module to your embedded nginx configuration.
Also provides a customizable nginx.conf for your further configurations.
I suggest you to copy this recipe inside your custom layer, or into a brand-new one.
Suggested path should be like:
poky/meta-yourlayer/recipes-httpd/nginx/nginx_%.bbappend
poky/meta-yourlayer/recipes-httpd/nginx/files/nginx.conf
You can then test bitbake execution:
bitbake nginx
Tested against nginx-1.12.1
on Yocto 'Rocko', running on Raspberry Pi module B+