added better nginx logic and default confs as well as rack file