How to fix «the "ssl" directive is deprecated, use the "listen ... ssl" directive instead» for Nginx?

Replace

listen 2197;
ssl on;

with

listen 2197 ssl;

stackoverflow.com/a/51703160