fix app server instantiation bugs and add nginx server