You should look into the open source Kong for managing your microservices http://getkong.org - Github repo https://github.com/mashape/kong
I suggest to start from here to get up to speed: http://microservices.io/patterns/apigateway.html
EDIT: It seems Kong doesn't really replace Nginx, it's actually a set of Lua scripts for Nginx.