Replace hardcoded paths referring to '/etc/nginx' with config variable instead.
Made config dir available as a parameter.