separate nginx setup from config
make more idempotent; set -e fixes