Add nginx config dir as a parameter

This also replaces a few hardcoded paths '/etc/nginx' to use the parameter.