Okay @rg305 I've made some very minor process. So when I follow that link to the location, it returns a 404 not found:
I've checked the acme folder location and it appears that no acme-challenge was created.
Similar to your recommendation @rg305 in this arctile here: .well-known/acme-challenge path access 404 - Help - Let's Encrypt Community Support (letsencrypt.org)
I created a test acme-challenge file in that location, and it worked. So it's not actually and access issue to the url, but it's the fact that a acme-challenge file is not being created for it to reference...
also please see nginx -T below - apologies I did have to slightly sanitise the FQDN in these.
server {
listen 80;
server_name testing.web.private.company.net;
server_tokens off;
autoindex_localtime on;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl http2;
server_name testing.web.private.company.net;
server_tokens off;
proxy_intercept_errors on;
error_page 401 495 496 @json401error;
ssl_certificate /etc/letsencrypt/live/testing.web.private.company.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/testing.web.private.company.net/privkey.pem;
ssl_protocols TLSv1.2;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
# mTLS handler
# This will return a 401 to all clients without a proper certificate
if ($ssl_client_verify != SUCCESS) { return 401; }
# This tells Nginx what CA to verify against
ssl_client_certificate /certificates/cacert.pem;
ssl_verify_depth 2;
# This tells Nginx to verify clients
ssl_verify_client optional;
location @json401error {
default_type application/json;
add_header 'Access-Control-Allow-Origin' '*' always;
return 401 '{"errors":["401 Unauthorized"]}';
}
location / {
proxy_pass http://tea-leaves-webapi;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header SSL_Client $ssl_client_s_dn;
proxy_set_header SSL_Client_Verify $ssl_client_verify;
proxy_ssl_verify off;
}
}
# configuration file /etc/letsencrypt/options-ssl-nginx.conf:
# This file contains important security parameters. If you modify this file
# manually, Certbot will be unable to automatically provide future security
# updates. Instead, Certbot will print and log an error message with a path to
# the up-to-date file that you will need to refer to when manually updating
# this file. Contents are based on https://ssl-config.mozilla.org
ssl_session_cache shared:le_nginx_SSL:10m;
ssl_session_timeout 1440m;
ssl_session_tickets off;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers off;
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";