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