I'm running a debian squeeze webserver with nginx, and i can't get SSL to work. The error that i get isn't from apache, but from the client web browser, with a "Connection timeout error"

I have purchased an SSL certificate from StartSSL, and when that didn't work, i tried generating my own just to troubleshoot. Both yielded the same error, and neither worked and my nginx log isn't showing anything.

My SSL config looks like this:

server {
            listen 443 default_server ssl;
            server_name tarror.org www.tarror.org;
            ssl on;
            ssl_certificate      /srv/ssl/nginx.pem;
            ssl_certificate_key  /srv/ssl/nginx.key;

            root /wdata/tarror.org;
            index index.php index.htm index.html;

            location ~ .php$ {
              fastcgi_index  index.php;
              fastcgi_param  SCRIPT_FILENAME /wdata/tarror.org$fastcgi_script_name;
              include fastcgi_params;

2 Answers 2


Open port 443 in your web server's firewall.

  • I just figured it out, my router wasn't fowarding connections of port 443 to my server Jan 28, 2013 at 6:43
  • 3
    I literally just face-palmed. Thanks for saving me some more frustration!
    – julianwyz
    Jan 12, 2016 at 14:14
  • 1
    Roses are red, FML, <3 U. And now this: sudo ufw allow https && sudo ufw enable
    – kub1x
    Mar 2, 2020 at 11:36

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:


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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.