Changed nginx.pid location to /var/run, as it works better for both Amazon Linux and Ubuntu