Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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_pass   127.0.0.1:9000;
              fastcgi_index  index.php;
              fastcgi_param  SCRIPT_FILENAME /wdata/tarror.org$fastcgi_script_name;
              include fastcgi_params;
            }
   }
share|improve this question
up vote 7 down vote accepted

Open port 443 in your web server's firewall.

share|improve this answer
    
I just figured it out, my router wasn't fowarding connections of port 443 to my server – Jack Renshaw Jan 28 '13 at 6:43
    
I literally just face-palmed. Thanks for saving me some more frustration! – wyzkid207 Jan 12 at 14:14

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

This may depend on the version of Nginx you are running however. 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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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