Certbot will not renew

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:cider123.duckdns.org

I ran this command:
certbot renew
It produced this output:

peter@cider123:~$ sudo certbot renew
[sudo] password for peter:
Saving debug log to /var/log/letsencrypt/letsencrypt.log


Processing /etc/letsencrypt/renewal/cider123.duckdns.org.conf


Cert is due for renewal, auto-renewing...
Plugins selected: Authenticator webroot, Installer None
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for cider123.duckdns.org
Using the webroot path /usr/share/jitsi-meet for all unmatched domains.
Waiting for verification...
Challenge failed for domain cider123.duckdns.org
http-01 challenge for cider123.duckdns.org
Cleaning up challenges
Attempting to renew cert (cider123.duckdns.org) from /etc/letsencrypt/renewal/cider123.duckdns.org.conf produced an unexpected error: Some challenges have failed.. Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/cider123.duckdns.org/fullchain.pem (failure)


All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/cider123.duckdns.org/fullchain.pem (failure)


1 renew failure(s), 0 parse failure(s)

IMPORTANT NOTES:

  • The following errors were reported by the server:

    Domain: cider123.duckdns.org
    Type: connection
    Detail: 78.33.99.154: Fetching
    http://cider123.duckdns.org/.well-known/acme-challenge/OXZ_6OKHvBVzI8LnnZTVyWSTbo0HkmJE9aPJL7Hr5hw:
    Error getting validation data

    To fix these errors, please make sure that your domain name was
    entered correctly and the DNS A/AAAA record(s) for that domain
    contain(s) the right IP address. Additionally, please check that
    your computer has a publicly routable IP address and that no
    firewalls are preventing the server from communicating with the
    client. If you're using the webroot plugin, you should also verify
    that you are serving files from the webroot path you provided.
    peter@cider123:~$

My web server is (include version):
Nginx (version upgraded 2 weeks ago but am on the same box ATM and cannot see it!)

The operating system my web server runs on is (include version):
Fedora 35

My hosting provider, if applicable, is:
Duckdns.org
I can login to a root shell on my machine (yes or no, or I don't know):
Yes when I am on a laptop!

I'm using a control panel to manage my site (no, or provide the name and version of the control panel):
No

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):
I think it is the latest as it was renewed recently - will check later if required.
About 4 months ago I had a problem in that I could not see my Jitsi server and I had to renew it, but on running certbot I was told it was OK till October! I then checked as best I could that my Jitsi/Letsencrypt was OK. The certs are there, I can ping the address and its still pointing to my external IP address and my firewall has not been changed. I tried see my server and can't even with no firewall enabled.
This may well be something basic stopping renewal but I am not experienced with configuring server but am reasonable using the commandline. I now need to get this sorted as I only a couple of weeks to do it! In particular is there a way to check the router is set correctly to point at the internal lan ports/IP address as I have been having problems with my VDSL and changed my router!?
Any other basic checks/advice would be appreciated.
PS I could put my online today if that would help point to what is still wrong.
Thanks

1 Like

Is this your current IP address?

It looks like that IP address doesn't really work the way you expect, it could be shared among several customers. You might need to ask for a public IP address.

❯ whois 78.33.99.154
% This is the RIPE Database query service.
% The objects are in RPSL format.
%
% The RIPE Database is subject to Terms and Conditions.
% See http://www.ripe.net/db/support/db-terms-conditions.pdf

% Note: this output has been filtered.
%       To receive output for a database update, use the "-B" flag.

% Information related to '78.33.99.0 - 78.33.99.255'

% Abuse contact for '78.33.99.0 - 78.33.99.255' is 'abuse@cityfibre.com'

inetnum:        78.33.99.0 - 78.33.99.255
netname:        ENTANET-ADSL
descr:          ADSL endpoints NAT conections only
country:        GB
admin-c:        ET216-RIPE
tech-c:         ET216-RIPE
status:         ASSIGNED PA
mnt-by:         ENTANET-MNT
mnt-by:         MNT-CITYFIBRE
mnt-lower:      ENTANET-MNT
mnt-routes:     ENTANET-MNT
created:        2009-04-14T16:33:34Z
last-modified:  2021-09-07T10:57:18Z
source:         RIPE

role:           Entanet Technical
address:        Entanet
remarks:        All objects pointing at this role have been anonomised to
remarks:        protect the identity of our customers.
admin-c:        EH1633-RIPE
tech-c:         EH1633-RIPE
nic-hdl:        ET216-RIPE
mnt-by:         ENTANET-MNT
created:        2003-08-26T18:23:31Z
last-modified:  2010-09-16T07:40:44Z
source:         RIPE # Filtered

% Information related to '78.32.0.0/15AS8468'

route:          78.32.0.0/15
descr:          ENTANET International Ltd
origin:         AS8468
mnt-by:         ENTANET-MNT
mnt-by:         MNT-CITYFIBRE
created:        2007-03-01T15:58:06Z
last-modified:  2021-09-07T11:54:46Z
source:         RIPE

% This query was served by the RIPE Database Query Service version 1.103 (WAGYU)

6 Likes

OP could be behind carrier grade NAT, which makes it impossible to connect to the host from the internet.

The only option would be to use the dns-01 challenge using the DuckDNS plugin certbot-dns-duckdns. But the use of a cert in general if your server can't be reached from the internet is debatable.

That said, the fact OP once did get a cert issued with the http-01 challenge makes CG-NAT less likely.

So first thing is to check whether the IP address is correct. Next is to check if connectivity from the internet is possible at all.

6 Likes

I have switched on the server and can ssh into it.
Here is more info for the form:
peter@cider123:~$ sudo certbot --version
certbot 0.40.0
peter@cider123:~$ sudo nginx -v
nginx version: nginx/1.18.0 (Ubuntu)

I can confirm the IP address is 78.33.99.154 and it has been working with this IP and ISP for at least one year previously.
I just checked NGINX is enabled and running but not on the internet.
Its very basic but I am not sure how to tet it, apologies.
Should I be able to get the NGINX webpage locally when entering the lan IP on a browser, or is there another way og checking its all working locally!?

FWIW this is the firewall:
peter@cider123:~$ sudo ufw status
Status: active

To Action From


80/tcp ALLOW Anywhere
443/tcp ALLOW Anywhere
4443/tcp ALLOW Anywhere
2222/tcp ALLOW Anywhere
22/tcp ALLOW Anywhere
10000:20000/udp ALLOW Anywhere
OpenSSH ALLOW Anywhere
80/tcp (v6) ALLOW Anywhere (v6)
443/tcp (v6) ALLOW Anywhere (v6)
4443/tcp (v6) ALLOW Anywhere (v6)
2222/tcp (v6) ALLOW Anywhere (v6)
22/tcp (v6) ALLOW Anywhere (v6)
22 (v6) ALLOW Anywhere (v6)
10000:20000/udp (v6) ALLOW Anywhere (v6)
8080/tcp (v6) ALLOW Anywhere (v6)
OpenSSH (v6) ALLOW Anywhere (v6)

peter@cider123:~$

I will leave my server running for a couple of hours in case its of any help.

Thanks

1 Like

Please show the output of:
curl -4 ifconfig.co

4 Likes

If it works locally, that does not mean it can be accessed from the internet. Sites like https://www.isitdownrightnow.com/ or https://downforeveryoneorjustme.com/ can help to check if a site is up or not.

5 Likes

The ufw status looks ok but none of those ports look open. A port scan from my own test server shows this. You should re-check your router and any NAT forwarding.

nmap -Pn -p22,80,443,2222,4443 cider123.duckdns.org
rDNS record for 78.33.99.154: 78-33-99-154.static.aquiss.com
PORT     STATE    SERVICE
22/tcp   filtered ssh
80/tcp   filtered http
443/tcp  filtered https
2222/tcp filtered EtherNet/IP-1
4443/tcp filtered pharos
5 Likes

Will get back in about an hour and give output of ifconfig.
I was not absolutely sure of the configuring of my new router TP Link V600 which is most likely to be the problem. Netstat is quite an app with lots of config but will try to use it later.
It does all seem to fit in when I changed the router!
Thanks

2 Likes

FYI

[peter@laptop ~]$ curl -4 ifconfig.co
78.33.99.154
[peter@laptop ~]$

Checking router ATM

Looks like you are still working on it but I am able to see your server

One thing is it looks like your nginx config is using the wrong cert file. You look to be using cert.pem but you should use fullchain.pem like:

ssl_certificate /etc/letsencrypt/live/cider123.duckdns.org/fullchain.pem;
5 Likes

Solved!

I apologise for wasting people's time - it was a typo and I could not see it!
In the "Virtual Server" config I had missed a zero, instead of my internal PC lan IP of 192.168.1.100 I had 192.168.1.10 which was what I used to have a few years ago. I had checked this setting more than once but kept reading it as 100! It may be I am a little old now (79) and the old grey matter is a little worn out.

After correcting the IP's I did a "certbot renew" and it renewed OK and I can now see my Jitsi server again.

FWIW my previous lan config was:
Router 192.168.1.1 > Attached Devices (Bound) 192.168.1.10 to 15

My existing config is:
Router 192.168.1.1 > Attached Devices (Bound) 192.168.1.110 to 115

I remember reading that my latest setup is not correct, is that the case technically or just etiquette!?

My server still seems to be configured OK, as only me as the host, can open a room. I will leave it up for a couple of hours if anyone wishes to visit.
And my lesson, as it always has been, is to "check and re-check the simple things before proceeding to more unlikely ones"!
Thanks
Regards

2 Likes

Happens to all of us (typos and aging ... <g>)

People trying to use https://cider123.duckdns.org will fail due to invalid cert. Your server is not using the right cert file it seems (as I noted). Some browsers may compensate but others may not.

If you don't care about that then nevermind. If you want, try this SSL Test site to see the problem (or SSL Labs or many other tools)

5 Likes

Mike,

Thanks for the link, it gives this result summary:

Hostname:
Matches Common Name or/and SAN
Expired:
No (16 days till expiration)
Public Key:
We were unable to find any issues in the public key of end-entity certificate
Trusted:
******We were unable to verify this certificate
Self-Signed:
No, the end-entity certificate is not self-signed
Chain Issues:
******The chain doesn't contain any intermediate certificates
Weak signatures:
No, certificates sent by the server were not signed utilizing a weak hash function
OCSP Status:

The two errors are marked ******

It seems that even though it did renew OK it was only till the 19th October. This is similar to what I was getting in that I was told the cert was running out but when I tries to renew, it said I could not do it till October. Could this have possibly happened during a Jitsi/letsencrypt update causing the certs to be moved/corrupted!?
If there is a way to delete the certs and start again! if so could you point me to some info as it looks like I might be in trouble after the 19th!

1 Like

Those errors relate to a mis-configured server. Not related to cert expiry. I already described the line in nginx that needs fixing. But, if you need further help please show result of sudo nginx -T command.

Either do this and upload config.txt file

sudo nginx -T >config.txt

Or, copy/paste entire output (v long) with 3 backticks before and after
```
output of: sudo nginx -T
```

5 Likes

Thanks, I will have a read and look at Nginx config as you said earlier, but am a little busy today so will be a little later in the week.
I will report back for completeness in case it helps others!
Regards

1 Like

Hi,

I have now lookedin the NGINX config file and think I have found the line to change and can confirm I have the following in /etc/letsencrypt/live/cider123.duckdns.org:
cert.pem chain.pem fullchain.pem privkey.pem README
This is part of the config withe the wrong line that needs changing to "fullchain"

 listen [::]:443 ssl;
    server_name cider123.duckdns.org;

# Mozilla Guideline v5.4, nginx 1.17.7, OpenSSL 1.1.1d, intermediate configuration
    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
    ssl_prefer_server_ciphers off;

    ssl_session_timeout 1d;
    ssl_session_cache shared:SSL:10m;  # about 40000 sessions
    ssl_session_tickets off;

    add_header Strict-Transport-Security "max-age=63072000" always;

#    ssl_certificate /etc/jitsi/meet/cider123.duckdns.org.crt;
#   ssl_certificate_key /etc/jitsi/meet/cider123.duckdns.org.key;

	ssl_certificate /etc/letsencrypt/live/cider123.duckdns.org/cert.pem;
	ssl_certificate_key /etc/letsencrypt/live/cider123.duckdns.org/privkey.pem;
	
    root /usr/share/jitsi-meet;

Before risking anything could someone please confirm the above is correct?

Thanks

1 Like

Can you please edit that post to place 3 backticks before and after the config lines? I think some important info was lost due to formatting which that will fix.
Like:
```
the config lines
```

4 Likes

edited post

I'd use fullchain.pem instead of cert.pem.

4 Likes

Mike,

I thought it would help by just posting the relevant part.
Below is the full o/p in case there is something else that is not correct!:

peter@cider123:~$ sudo nginx -T
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
# configuration file /etc/nginx/nginx.conf:
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
	worker_connections 768;
	# multi_accept on;
}

http {

	##
	# Basic Settings
	##

	sendfile on;
	tcp_nopush on;
	tcp_nodelay on;
	keepalive_timeout 65;
	types_hash_max_size 2048;
	# server_tokens off;

	# server_names_hash_bucket_size 64;
	# server_name_in_redirect off;

	include /etc/nginx/mime.types;
	default_type application/octet-stream;

	##
	# SSL Settings
	##

	ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
	ssl_prefer_server_ciphers on;

	##
	# Logging Settings
	##

	access_log /var/log/nginx/access.log;
	error_log /var/log/nginx/error.log;

	##
	# Gzip Settings
	##

	gzip on;

	# gzip_vary on;
	# gzip_proxied any;
	# gzip_comp_level 6;
	# gzip_buffers 16 8k;
	# gzip_http_version 1.1;
	# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

	##
	# Virtual Host Configs
	##

	include /etc/nginx/conf.d/*.conf;
	include /etc/nginx/sites-enabled/*;
}


#mail {
#	# See sample authentication script at:
#	# http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
# 
#	# auth_http localhost/auth.php;
#	# pop3_capabilities "TOP" "USER";
#	# imap_capabilities "IMAP4rev1" "UIDPLUS";
# 
#	server {
#		listen     localhost:110;
#		protocol   pop3;
#		proxy      on;
#	}
# 
#	server {
#		listen     localhost:143;
#		protocol   imap;
#		proxy      on;
#	}
#}

# configuration file /etc/nginx/modules-enabled/50-mod-http-image-filter.conf:
load_module modules/ngx_http_image_filter_module.so;

# configuration file /etc/nginx/modules-enabled/50-mod-http-xslt-filter.conf:
load_module modules/ngx_http_xslt_filter_module.so;

# configuration file /etc/nginx/modules-enabled/50-mod-mail.conf:
load_module modules/ngx_mail_module.so;

# configuration file /etc/nginx/modules-enabled/50-mod-stream.conf:
load_module modules/ngx_stream_module.so;

# configuration file /etc/nginx/mime.types:

types {
    text/html                             html htm shtml;
    text/css                              css;
    text/xml                              xml;
    image/gif                             gif;
    image/jpeg                            jpeg jpg;
    application/javascript                js;
    application/atom+xml                  atom;
    application/rss+xml                   rss;

    text/mathml                           mml;
    text/plain                            txt;
    text/vnd.sun.j2me.app-descriptor      jad;
    text/vnd.wap.wml                      wml;
    text/x-component                      htc;

    image/png                             png;
    image/tiff                            tif tiff;
    image/vnd.wap.wbmp                    wbmp;
    image/x-icon                          ico;
    image/x-jng                           jng;
    image/x-ms-bmp                        bmp;
    image/svg+xml                         svg svgz;
    image/webp                            webp;

    application/font-woff                 woff;
    application/java-archive              jar war ear;
    application/json                      json;
    application/mac-binhex40              hqx;
    application/msword                    doc;
    application/pdf                       pdf;
    application/postscript                ps eps ai;
    application/rtf                       rtf;
    application/vnd.apple.mpegurl         m3u8;
    application/vnd.ms-excel              xls;
    application/vnd.ms-fontobject         eot;
    application/vnd.ms-powerpoint         ppt;
    application/vnd.wap.wmlc              wmlc;
    application/vnd.google-earth.kml+xml  kml;
    application/vnd.google-earth.kmz      kmz;
    application/x-7z-compressed           7z;
    application/x-cocoa                   cco;
    application/x-java-archive-diff       jardiff;
    application/x-java-jnlp-file          jnlp;
    application/x-makeself                run;
    application/x-perl                    pl pm;
    application/x-pilot                   prc pdb;
    application/x-rar-compressed          rar;
    application/x-redhat-package-manager  rpm;
    application/x-sea                     sea;
    application/x-shockwave-flash         swf;
    application/x-stuffit                 sit;
    application/x-tcl                     tcl tk;
    application/x-x509-ca-cert            der pem crt;
    application/x-xpinstall               xpi;
    application/xhtml+xml                 xhtml;
    application/xspf+xml                  xspf;
    application/zip                       zip;

    application/octet-stream              bin exe dll;
    application/octet-stream              deb;
    application/octet-stream              dmg;
    application/octet-stream              iso img;
    application/octet-stream              msi msp msm;

    application/vnd.openxmlformats-officedocument.wordprocessingml.document    docx;
    application/vnd.openxmlformats-officedocument.spreadsheetml.sheet          xlsx;
    application/vnd.openxmlformats-officedocument.presentationml.presentation  pptx;

    audio/midi                            mid midi kar;
    audio/mpeg                            mp3;
    audio/ogg                             ogg;
    audio/x-m4a                           m4a;
    audio/x-realaudio                     ra;

    video/3gpp                            3gpp 3gp;
    video/mp2t                            ts;
    video/mp4                             mp4;
    video/mpeg                            mpeg mpg;
    video/quicktime                       mov;
    video/webm                            webm;
    video/x-flv                           flv;
    video/x-m4v                           m4v;
    video/x-mng                           mng;
    video/x-ms-asf                        asx asf;
    video/x-ms-wmv                        wmv;
    video/x-msvideo                       avi;
}

# configuration file /etc/nginx/sites-enabled/cider123.duckdns.org.conf:
server_names_hash_bucket_size 64;

server {
    listen 80;
    listen [::]:80;
    server_name cider123.duckdns.org;

    location ^~ /.well-known/acme-challenge/ {
       default_type "text/plain";
       root         /usr/share/jitsi-meet;
    }
    location = /.well-known/acme-challenge/ {
       return 404;
    }
#    location / {
#      return 301 https://$host$request_uri;
#    }
}
server {
    listen 443 ssl;
    listen [::]:443 ssl;
    server_name cider123.duckdns.org;

# Mozilla Guideline v5.4, nginx 1.17.7, OpenSSL 1.1.1d, intermediate configuration
    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
    ssl_prefer_server_ciphers off;

    ssl_session_timeout 1d;
    ssl_session_cache shared:SSL:10m;  # about 40000 sessions
    ssl_session_tickets off;

    add_header Strict-Transport-Security "max-age=63072000" always;

#    ssl_certificate /etc/jitsi/meet/cider123.duckdns.org.crt;
#   ssl_certificate_key /etc/jitsi/meet/cider123.duckdns.org.key;

	ssl_certificate /etc/letsencrypt/live/cider123.duckdns.org/cert.pem;
	ssl_certificate_key /etc/letsencrypt/live/cider123.duckdns.org/privkey.pem;

	
    root /usr/share/jitsi-meet;

    # ssi on with javascript for multidomain variables in config.js
    ssi on;
    ssi_types application/x-javascript application/javascript;

    index index.html index.htm;
    error_page 404 /static/404.html;

    gzip on;
    gzip_types text/plain text/css application/javascript application/json image/x-icon application/octet-stream application/wasm;
    gzip_vary on;
    gzip_proxied no-cache no-store private expired auth;
    gzip_min_length 512;

    location = /config.js {
        alias /etc/jitsi/meet/cider123.duckdns.org-config.js;
    }

    location = /external_api.js {
        alias /usr/share/jitsi-meet/libs/external_api.min.js;
    }

    #ensure all static content can always be found first
    location ~ ^/(libs|css|static|images|fonts|lang|sounds|connection_optimization|.well-known)/(.*)$
    {
        add_header 'Access-Control-Allow-Origin' '*';
        alias /usr/share/jitsi-meet/$1/$2;

        # cache all versioned files
        if ($arg_v) {
          expires 1y;
        }
    }

    # BOSH
    location = /http-bind {
        proxy_pass      http://localhost:5280/http-bind;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header Host $http_host;
    }

    # xmpp websockets
    location = /xmpp-websocket {
        proxy_pass http://127.0.0.1:5280/xmpp-websocket?prefix=$prefix&$args;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $http_host;
        tcp_nodelay on;
    }

    # colibri (JVB) websockets for jvb1
    location ~ ^/colibri-ws/default-id/(.*) {
       proxy_pass http://127.0.0.1:9090/colibri-ws/default-id/$1$is_args$args;
       proxy_http_version 1.1;
       proxy_set_header Upgrade $http_upgrade;
       proxy_set_header Connection "upgrade";
       tcp_nodelay on;
    }

    location ~ ^/([^/?&:'"]+)$ {
        try_files $uri @root_path;
    }

    location @root_path {
        rewrite ^/(.*)$ / break;
    }

    location ~ ^/([^/?&:'"]+)/config.js$
    {
       set $subdomain "$1.";
       set $subdir "$1/";

       alias /etc/jitsi/meet/cider123.duckdns.org-config.js;
    }

    #Anything that didn't match above, and isn't a real file, assume it's a room name and redirect to /
    location ~ ^/([^/?&:'"]+)/(.*)$ {
        set $subdomain "$1.";
        set $subdir "$1/";
        rewrite ^/([^/?&:'"]+)/(.*)$ /$2;
    }

    # BOSH for subdomains
    location ~ ^/([^/?&:'"]+)/http-bind {
        set $subdomain "$1.";
        set $subdir "$1/";
        set $prefix "$1";

        rewrite ^/(.*)$ /http-bind;
    }

    # websockets for subdomains
    location ~ ^/([^/?&:'"]+)/xmpp-websocket {
        set $subdomain "$1.";
        set $subdir "$1/";
        set $prefix "$1";

        rewrite ^/(.*)$ /xmpp-websocket;
    }
}

# configuration file /etc/nginx/sites-enabled/default:
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# https://www.nginx.com/resources/wiki/start/
# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
# https://wiki.debian.org/Nginx/DirectoryStructure
#
# In most cases, administrators will remove this file from sites-enabled/ and
# leave it as reference inside of sites-available where it will continue to be
# updated by the nginx packaging team.
#
# This file will automatically load configuration files provided by other
# applications, such as Drupal or Wordpress. These applications will be made
# available underneath a path with that package name, such as /drupal8.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##

# Default server configuration
#
server {
	listen 80 default_server;
	listen [::]:80 default_server;

	# SSL configuration
	#
	# listen 443 ssl default_server;
	# listen [::]:443 ssl default_server;
	#
	# Note: You should disable gzip for SSL traffic.
	# See: https://bugs.debian.org/773332
	#
	# Read up on ssl_ciphers to ensure a secure configuration.
	# See: https://bugs.debian.org/765782
	#
	# Self signed certs generated by the ssl-cert package
	# Don't use them in a production server!
	#
	# include snippets/snakeoil.conf;

	root /var/www/html;

	# Add index.php to the list if you are using PHP
	index index.html index.htm index.nginx-debian.html;

	server_name _;

	location / {
		# First attempt to serve request as file, then
		# as directory, then fall back to displaying a 404.
		try_files $uri $uri/ =404;
	}

	# pass PHP scripts to FastCGI server
	#
	#location ~ \.php$ {
	#	include snippets/fastcgi-php.conf;
	#
	#	# With php-fpm (or other unix sockets):
	#	fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
	#	# With php-cgi (or other tcp sockets):
	#	fastcgi_pass 127.0.0.1:9000;
	#}

	# deny access to .htaccess files, if Apache's document root
	# concurs with nginx's one
	#
	#location ~ /\.ht {
	#	deny all;
	#}
}


# Virtual Host configuration for example.com
#
# You can move that to a different file under sites-available/ and symlink that
# to sites-enabled/ to enable it.
#
#server {
#	listen 80;
#	listen [::]:80;
#
#	server_name example.com;
#
#	root /var/www/example.com;
#	index index.html;
#
#	location / {
#		try_files $uri $uri/ =404;
#	}
#}

Hope that helps
Thanks

1 Like
server {
    listen 80;
    listen [::]:80;
    server_name cider123.duckdns.org;

    location ^~ /.well-known/acme-challenge/ {
       default_type "text/plain";
       root         /usr/share/jitsi-meet;
    }
    location = /.well-known/acme-challenge/ {
       return 404;
    }
#    location / {
#      return 301 https://$host$request_uri;
#    }
}

That's confusing. Normally is more like this:

server {
    listen 80;
    listen [::]:80;
    server_name cider123.duckdns.org;

    location /.well-known/acme-challenge/ {
       default_type "text/plain";       # not necessary
       root         /usr/share/jitsi-meet;
    }
   location / {
     return 301 https://$host$request_uri;
   }
}

AND
You are still using cert.pem when you should be using fullchain.pem as noted by rg305 earlier

4 Likes