In nginx, $https cannot be redefined. Changed to use $my_https instead.