Changes to make PyTach run using uWSGI behind nginx