fix bug and add nginx configuration