nginx not listening on port 443
biscotty
nginx-forum at forum.nginx.org
Wed Aug 31 22:06:09 UTC 2022
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 {
}
}
```
Posted at Nginx Forum: https://forum.nginx.org/read.php?2,295067,295067#msg-295067
More information about the nginx
mailing list