Welcome! Log In Create A New Profile

Advanced

nginx not listening on port 443

August 31, 2022 06:06PM
On Fedora 36

nginx runs fine and i can access it on localhost and the LAN. However I'm having trouble enabling ssl. When I try with https I get ERR_CONNECTION_REFUSED. nginx error log reports no error. I'd really appreciate some help because I've been working at this all day. This is my nginx.conf:

```
user nginx;
worker_processes 1;
error_log logs/error.log;
error_log logs/error.log notice;
error_log logs/error.log info;
pid logs/nginx.pid;

events {
worker_connections 1024;
}

http {
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log logs/access.log main;
sendfile on;
keepalive_timeout 65;

server {
listen 80;
server_name localhost;
access_log logs/host.access.log main;

location / {
root html;
index index.html index.htm;
}

error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
'''

and this is my conf.d/ssl.conf

```
NGINX_SSL=true

server {
listen: 80;
listen [::]:80;
server_name biscotty.dev;
return 301 https://$host$request_uri;
}

server {
listen 443 http2 ssl default_server;
listen [::]:443 http2 ssl default_server;
server_name biscotty.dev;
ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt;
ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;
ssl_dhparam /etc/ssl/certs/dhparam.pem;
root /usr/share/nginx/html;

location / {
}

error_page 404 /404.html;
location = /404.html {
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
```
Subject Author Posted

nginx not listening on port 443

biscotty August 31, 2022 06:06PM

Re: nginx not listening on port 443

Francis Daly August 31, 2022 06:36PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 141
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready