Cannot connect to HTTPS port on Ubuntu

Posted by Simpleton on Server Fault See other posts from Server Fault or by Simpleton
Published on 2014-06-04T14:52:52Z Indexed on 2014/06/04 15:28 UTC
Read the original article Hit count: 218

Filed under:
|
|
|

I've installed a new SSL certificate and set up Nginx to use it. But requests time out when trying to hit HTTPS on the site. When I telnet to my domain on port 80 it connects, but times out on port 443. I'm not sure if there's some defaults on Ubuntu preventing a connection.

UFW status shows:

443  ALLOW    Anywhere

netstat -a shows:

tcp        0      0 *:https                 *:*                     LISTEN  

nmap localhost shows:

443/tcp  open  https

The relevant block in the Nginx config is:

server {
    listen 443;
    listen [::]:80 ipv6only=on;
    listen 80;
    root /path/to/app;
    server_name mydomain.com

    ssl on;
    ssl_certificate /etc/nginx/ssl/ssl-bundle.crt;
    ssl_certificate_key /etc/nginx/ssl/server.key;

    location / {
      proxy_pass http://mydomain.com;
      proxy_set_header Host $host;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

© Server Fault or respective owner

Related posts about ubuntu

Related posts about nginx