Welcome! Log In Create A New Profile

Advanced

SSL Configuration

Posted by biscotty 
SSL Configuration
September 04, 2022 05:14PM
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. 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 indeifinitely. 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@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@biscotty-lt:/etc/nginx/conf.d# curl -I https://biscotty.dev
^C
```
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 285
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready