fix bug and add nginx configuration

fix bug and add nginx configuration