Edit your listen statement from:
listen 443;
to
listen 443 ssl;
and comment out or delete :
# ssl on;
then check nginx -t again.
Edit your listen statement from:
listen 443;
to
listen 443 ssl;
and comment out or delete :
# ssl on;
then check nginx -t again.