Instead of having variables being flipped around, just specify which Nginx directives are needed in the configuration file.
This avoids potential issues when running the tests in environments which might set variables which Nginx tries to read on startup. For example, the $NGINX variable was being picked from the Travis-CI build matrix configuration.