curl port 443 connection refused by nginx

On my process of migrating our new server to nginx from apache i got an error :
curl: (7) Failed to connect to my.server.url port 443: Connection refused

My nginx conf file looks no problem, and doing curl from another server also running well. After some research on Google looks like the problem is with my server DNS, the DNS of server resolve urlĀ my.server.urlĀ as 127.0.0.1 which my nginx not listen to.

The solution is simple, just add listen 127.0.0.1:443; to your vhost conf file, and reload your nginx “nginx -s reload

BAM!!! it works again.