Nginx SSL not working

Solution 1:

Open port 443 in your web server's firewall.

Solution 2:

I'd first try to take the ssl on; line out, as that is deprecated since nginx 1.15.0. Having ssl in the listen line does the same thing.

From Nginx documentation:

Syntax: ssl on | off;
This directive was made obsolete in version 1.15.0. 
The ssl parameter of the listen directive should be used instead.

This article worked for me using self signed certificates on Ubuntu:

http://www.networkinghowtos.com/howto/configure-nginx-to-use-ssl-certificates/

This shows the config syntax required for SSL based on different versions of nginx.

Make sure Nginx has port 443 listening using netstat -an. Also make sure you don't have any firewall/iptables rules that may be blocking port 443.