$ 0 0 For SSL you need a second server {} block and a listen 443.ssl_certificate is not going to work for port 80.