Fix bugs in nginx config