Fix some bug and complete nginx gevent configure