Let's encrypt doesn't work without making nginx default


#1

Hello,

I am using multiple nginx server blocks…

Here is my nignx config for example.com

server {
listen 80;
listen 443 ssl http2;

ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;

root /var/www/example.com/public;

server_name example.com;

}

This works without https however if i add default to following…

listen 443 default ssl http2 it works.

But i can’t have default tag on all server blocks for multiple domains. Why is this is happening? Am i missing something or any suggestion to fix this?

Thanks


#2

hi @wapp

yes - post your full configurations file (it’s ok to update domain names to something non sensical)

explain why you think your config should work (hopefully with some documentation) and what you are observing

this should help narrow down the problem


#3

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.