Trouble setting up SSL

Brian Carey biscotty666 at gmail.com
Sun Sep 4 23:26:05 UTC 2022


Hi,

I'm pretty new to nginx but do have a server up and running. I've been 
pulling my hair out over ssl setup though. I have read the docs on your 
server and some others like the alpine site. The most recent attempt I 
followed the video tutorial on your website. Whenever I try to connect 
via ssl it hangs.  I hope someone here has some ideas because I don't 
know where else to turn.

No errors show in the nginx logs.

I'm running Ubuntu 20.04. Nginx was installed following the instructions 
on your website.

When I try to access http://www.biscotty.dev with curl I get a response. 
If I explicitly request https it hangs indefinitely. The 
commands/responses are posted below.

Not sure if this matters but I have learned that dev domains try to 
enforce https, so explicitly using http in a browser gui craps out no 
matter what, but curl ignores this and serves you via http anyway. I 
don't know if this matters but I thought I would mention it.

Here is my .conf file. I have not modified anything else from the 
initial install.

'''
server {
listen 80 default_server;
server_name www.biscotty.dev;
return 301 https://$server_name$request_uri;
}

server {
listen 443 ssl;
server_name www.biscotty.dev;

ssl_certificate /etc/nginx/ssl/biscotty.dev.crt;
ssl_certificate_key /etc/nginx/ssl/biscotty.dev.key;

location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
}
'''
'''
root at biscotty-lt:/etc/nginx/conf.d# curl -I http://biscotty.dev
HTTP/1.1 301 Moved Permanently
Server: nginx/1.23.1
Date: Sun, 04 Sep 2022 21:05:01 GMT
Content-Type: text/html
Content-Length: 169
Connection: keep-alive
Location: https://www.biscotty.dev/

root at biscotty-lt:/etc/nginx/conf.d# curl -I https://biscotty.dev
^C
```




More information about the nginx mailing list