Certbot failed to authenticate some domains

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: docmariaj.com

I ran this command: sudo certbot renew --dry-run --debug-challenges -v

It produced this output:

2024-04-29 22:58:02,744:DEBUG:urllib3.connectionpool:http://localhost:None "GET /v2/connections?snap=certbot&interface=content HTTP/1.1" 200 97
2024-04-29 22:58:02,909:DEBUG:certbot._internal.main:certbot version: 2.10.0
2024-04-29 22:58:02,910:DEBUG:certbot._internal.main:Location of certbot entry point: /snap/certbot/3700/bin/certbot
2024-04-29 22:58:02,910:DEBUG:certbot._internal.main:Arguments: ['--dry-run', '--debug-challenges', '-v', '--preconfigured-renewal']
2024-04-29 22:58:02,910:DEBUG:certbot._internal.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#apache,PluginEntryPoint#manual,PluginEntryPoint#nginx,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2024-04-29 22:58:02,930:DEBUG:certbot._internal.log:Root logging level set at 20
2024-04-29 22:58:02,932:DEBUG:certbot._internal.display.obj:Notifying user: Processing /etc/letsencrypt/renewal/docmariaj.com.conf
2024-04-29 22:58:02,934:DEBUG:certbot.configuration:Var server=https://acme-staging-v02.api.letsencrypt.org/directory (set by user).
2024-04-29 22:58:02,934:DEBUG:certbot.configuration:Var account=None (set by user).
2024-04-29 22:58:02,934:DEBUG:certbot._internal.plugins.selection:Requested authenticator None and installer None
2024-04-29 22:58:02,934:DEBUG:certbot._internal.plugins.selection:Requested authenticator None and installer None
2024-04-29 22:58:02,955:DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): r3.o.lencr.org:80
2024-04-29 22:58:03,017:DEBUG:urllib3.connectionpool:http://r3.o.lencr.org:80 "POST / HTTP/1.1" 200 503
2024-04-29 22:58:03,018:DEBUG:certbot.ocsp:OCSP response for certificate /etc/letsencrypt/archive/docmariaj.com/cert1.pem is signed by the certificate's issuer.
2024-04-29 22:58:03,019:DEBUG:certbot.ocsp:OCSP certificate status for /etc/letsencrypt/archive/docmariaj.com/cert1.pem is: OCSPCertStatus.GOOD
2024-04-29 22:58:03,023:DEBUG:certbot._internal.storage:Should renew, less than 30 days before certificate expiry 2024-05-18 22:22:07 UTC.
2024-04-29 22:58:03,023:INFO:certbot._internal.renewal:Certificate is due for renewal, auto-renewing...
2024-04-29 22:58:03,023:DEBUG:certbot._internal.plugins.selection:Requested authenticator apache and installer apache
2024-04-29 22:58:03,123:DEBUG:certbot_apache._internal.configurator:Apache version is 2.4.57
2024-04-29 22:58:03,365:DEBUG:certbot._internal.plugins.selection:Single candidate plugin: * apache
Description: Apache Web Server plugin
Interfaces: Authenticator, Installer, Plugin
Entry point: EntryPoint(name='apache', value='certbot_apache._internal.entrypoint:ENTRYPOINT', group='certbot.plugins')
Initialized: <certbot_apache._internal.override_centos.CentOSConfigurator object at 0x7fbe615990a0>
Prep: True
2024-04-29 22:58:03,366:DEBUG:certbot._internal.plugins.selection:Single candidate plugin: * apache
Description: Apache Web Server plugin
Interfaces: Authenticator, Installer, Plugin
Entry point: EntryPoint(name='apache', value='certbot_apache._internal.entrypoint:ENTRYPOINT', group='certbot.plugins')
Initialized: <certbot_apache._internal.override_centos.CentOSConfigurator object at 0x7fbe615990a0>
Prep: True
2024-04-29 22:58:03,366:DEBUG:certbot._internal.plugins.selection:Selected authenticator <certbot_apache._internal.override_centos.CentOSConfigurator object at 0x7fbe615990a0> and installer <certbot_apache._internal.override_centos.CentOSConfigurator object at 0x7fbe615990a0>
2024-04-29 22:58:03,366:INFO:certbot._internal.plugins.selection:Plugins selected: Authenticator apache, Installer apache
2024-04-29 22:58:03,431:DEBUG:certbot._internal.main:Picked account: <Account(RegistrationResource(body=Registration(key=None, contact=(), agreement=None, status=None, terms_of_service_agreed=None, only_return_existing=None, external_account_binding=None), uri='https://acme-staging-v02.api.letsencrypt.org/acme/acct/146393794', new_authzr_uri=None, terms_of_service=None), c3abde54d27d690594dd41b9499ed20e, Meta(creation_dt=datetime.datetime(2024, 4, 29, 14, 35, 49, tzinfo=<UTC>), creation_host='drmj', register_to_eff=None))>
2024-04-29 22:58:03,432:DEBUG:acme.client:Sending GET request to https://acme-staging-v02.api.letsencrypt.org/directory.
2024-04-29 22:58:03,458:DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): acme-staging-v02.api.letsencrypt.org:443
2024-04-29 22:58:03,601:DEBUG:urllib3.connectionpool:https://acme-staging-v02.api.letsencrypt.org:443 "GET /directory HTTP/1.1" 200 821
2024-04-29 22:58:03,601:DEBUG:acme.client:Received response:
HTTP 200
Server: nginx
"/var/log/letsencrypt/letsencrypt.log" 353L, 23225B
2024-04-29 22:58:02,744:DEBUG:urllib3.connectionpool:http://localhost:None "GET /v2/connections?snap=certbot&interface=content HTTP/1.1" 200 97
2024-04-29 22:58:02,909:DEBUG:certbot._internal.main:certbot version: 2.10.0
2024-04-29 22:58:02,910:DEBUG:certbot._internal.main:Location of certbot entry point: /snap/certbot/3700/bin/certbot
2024-04-29 22:58:02,910:DEBUG:certbot._internal.main:Arguments: ['--dry-run', '--debug-challenges', '-v', '--preconfigured-renewal']
2024-04-29 22:58:02,930:DEBUG:certbot._internal.log:Root logging level set at 20
2024-04-29 22:58:02,932:DEBUG:certbot._internal.display.obj:Notifying user: Processing /etc/letsencrypt/renewal/docmariaj.com.conf
2024-04-29 22:58:02,934:DEBUG:certbot.configuration:Var server=https://acme-staging-v02.api.letsencrypt.org/directory (set by user).
2024-04-29 22:58:02,934:DEBUG:certbot.configuration:Var account=None (set by user).
2024-04-29 22:58:02,934:DEBUG:certbot._internal.plugins.selection:Requested authenticator None and installer None
2024-04-29 22:58:02,934:DEBUG:certbot._internal.plugins.selection:Requested authenticator None and installer None
2024-04-29 22:58:02,955:DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): r3.o.lencr.org:80
2024-04-29 22:58:03,017:DEBUG:urllib3.connectionpool:http://r3.o.lencr.org:80 "POST / HTTP/1.1" 200 503
2024-04-29 22:58:03,018:DEBUG:certbot.ocsp:OCSP response for certificate /etc/letsencrypt/archive/docmariaj.com/cert1.pem is signed by the certificate's issuer.
2024-04-29 22:58:03,019:DEBUG:certbot.ocsp:OCSP certificate status for /etc/letsencrypt/archive/docmariaj.com/cert1.pem is: OCSPCertStatus.GOOD
2024-04-29 22:58:03,023:DEBUG:certbot._internal.storage:Should renew, less than 30 days before certificate expiry 2024-05-18 22:22:07 UTC.
2024-04-29 22:58:03,023:INFO:certbot._internal.renewal:Certificate is due for renewal, auto-renewing...
2024-04-29 22:58:03,023:DEBUG:certbot._internal.plugins.selection:Requested authenticator apache and installer apache
2024-04-29 22:58:03,123:DEBUG:certbot_apache._internal.configurator:Apache version is 2.4.57
2024-04-29 22:58:03,365:DEBUG:certbot._internal.plugins.selection:Single candidate plugin: * apache
Description: Apache Web Server plugin
Interfaces: Authenticator, Installer, Plugin
Entry point: EntryPoint(name='apache', value='certbot_apache._internal.entrypoint:ENTRYPOINT', group='certbot.plugins')
Initialized: <certbot_apache._internal.override_centos.CentOSConfigurator object at 0x7fbe615990a0>
Prep: True
2024-04-29 22:58:03,366:DEBUG:certbot._internal.plugins.selection:Single candidate plugin: * apache
Description: Apache Web Server plugin
Interfaces: Authenticator, Installer, Plugin
Entry point: EntryPoint(name='apache', value='certbot_apache._internal.entrypoint:ENTRYPOINT', group='certbot.plugins')
Initialized: <certbot_apache._internal.override_centos.CentOSConfigurator object at 0x7fbe615990a0>
Prep: True
2024-04-29 22:58:03,366:INFO:certbot._internal.plugins.selection:Plugins selected: Authenticator apache, Installer apache
2024-04-29 22:58:03,432:DEBUG:acme.client:Sending GET request to https://acme-staging-v02.api.letsencrypt.org/directory.
2024-04-29 22:58:03,458:DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): acme-staging-v02.api.letsencrypt.org:443
2024-04-29 22:58:03,601:DEBUG:urllib3.connectionpool:https://acme-staging-v02.api.letsencrypt.org:443 "GET /directory HTTP/1.1" 200 821
2024-04-29 22:58:03,601:DEBUG:acme.client:Received response:
HTTP 200
Server: nginx
Date: Tue, 30 Apr 2024 02:58:03 GMT
X-Frame-Options: DENY
Strict-Transport-Security: max-age=604800

{
  "XjpIh54HFno": "https://community.letsencrypt.org/t/adding-random-entries-to-the-directory/33417",
  "keyChange": "https://acme-staging-v02.api.letsencrypt.org/acme/key-change",
  "meta": {
    "caaIdentities": [
      "letsencrypt.org"
    ],
    "termsOfService": "https://letsencrypt.org/documents/LE-SA-v1.4-April-3-2024.pdf",
    "website": "https://letsencrypt.org/docs/staging-environment/"
  },
  "newAccount": "https://acme-staging-v02.api.letsencrypt.org/acme/new-acct",
  "newNonce": "https://acme-staging-v02.api.letsencrypt.org/acme/new-nonce",
  "newOrder": "https://acme-staging-v02.api.letsencrypt.org/acme/new-order",
  "renewalInfo": "https://acme-staging-v02.api.letsencrypt.org/draft-ietf-acme-ari-02/renewalInfo/",
  "revokeCert": "https://acme-staging-v02.api.letsencrypt.org/acme/revoke-cert"
}
2024-04-29 22:58:03,603:DEBUG:certbot._internal.display.obj:Notifying user: Simulating renewal of an existing certificate for docmariaj.com
2024-04-29 22:58:03,606:DEBUG:acme.client:Requesting fresh nonce
2024-04-29 22:58:03,606:DEBUG:acme.client:Sending HEAD request to https://acme-staging-v02.api.letsencrypt.org/acme/new-nonce.
2024-04-29 22:58:03,653:DEBUG:urllib3.connectionpool:https://acme-staging-v02.api.letsencrypt.org:443 "HEAD /acme/new-nonce HTTP/1.1" 200 0
2024-04-29 22:58:03,654:DEBUG:acme.client:Received response:
HTTP 200
Server: nginx
Date: Tue, 30 Apr 2024 02:58:03 GMT
Connection: keep-alive
Cache-Control: public, max-age=0, no-cache
Link: <https://acme-staging-v02.api.letsencrypt.org/directory>;rel="index"
Replay-Nonce: vU6liGrnrOaq49saNQY_9NraAQRtGMM6p2RlcS-EAIHwRBLhzb0
X-Frame-Options: DENY
Strict-Transport-Security: max-age=604800


2024-04-29 22:58:03,655:DEBUG:acme.client:Storing nonce: vU6liGrnrOaq49saNQY_9NraAQRtGMM6p2RlcS-EAIHwRBLhzb0
2024-04-29 22:58:03,655:DEBUG:acme.client:JWS payload:
  "payload": "ewogICJpZGVudGlmaWVycyI6IFsKICAgIHsKICAgICAgInR5cGUiOiAiZG5zIiwKICAgICAgInZhbHVlIjogImRvY21hcmlhai5jb20iCiAgICB9CiAgXQp9"
}
2024-04-29 22:58:03,757:DEBUG:urllib3.connectionpool:https://acme-staging-v02.api.letsencrypt.org:443 "POST /acme/new-order HTTP/1.1" 201 352
2024-04-29 22:58:03,758:DEBUG:acme.client:Received response:
HTTP 201
Server: nginx
Date: Tue, 30 Apr 2024 02:58:03 GMT
Content-Type: application/json
Content-Length: 352
Connection: keep-alive
Boulder-Requester: 146393794
Cache-Control: public, max-age=0, no-cache
Link: <https://acme-staging-v02.api.letsencrypt.org/directory>;rel="index"
Location: https://acme-staging-v02.api.letsencrypt.org/acme/order/146393794/16231208414
Replay-Nonce: gP7UL-1g2AK8vei67u-BXd1-luCvZlbKam-TffR-yuv0gg9iylw
X-Frame-Options: DENY
Strict-Transport-Security: max-age=604800

{
  "status": "pending",
  "expires": "2024-05-07T02:58:03Z",
  "identifiers": [
    {
      "type": "dns",
      "value": "docmariaj.com"
    }
  ],
  "authorizations": [
    "https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/12191505584"
  ],
  "finalize": "https://acme-staging-v02.api.letsencrypt.org/acme/finalize/146393794/16231208414"
}
2024-04-29 22:58:03,758:DEBUG:acme.client:Storing nonce: gP7UL-1g2AK8vei67u-BXd1-luCvZlbKam-TffR-yuv0gg9iylw
2024-04-29 22:58:03,758:DEBUG:acme.client:JWS payload:
b''
2024-04-29 22:58:03,761:DEBUG:acme.client:Sending POST request to https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/12191505584:
{
  "payload": ""
}
2024-04-29 22:58:03,815:DEBUG:urllib3.connectionpool:https://acme-staging-v02.api.letsencrypt.org:443 "POST /acme/authz-v3/12191505584 HTTP/1.1" 200 818
2024-04-29 22:58:03,816:DEBUG:acme.client:Received response:
HTTP 200
Server: nginx
Date: Tue, 30 Apr 2024 02:58:03 GMT
Content-Type: application/json
Content-Length: 818
Connection: keep-alive
Boulder-Requester: 146393794
Cache-Control: public, max-age=0, no-cache
Link: <https://acme-staging-v02.api.letsencrypt.org/directory>;rel="index"
Replay-Nonce: gP7UL-1gcMsWUdGYMAs0i-VYU1_bCnqbEneTxSuYDFm27_SUF5c
X-Frame-Options: DENY
Strict-Transport-Security: max-age=604800

{
  "identifier": {
    "type": "dns",
    "value": "docmariaj.com"
  },
  "status": "pending",
  "expires": "2024-05-07T02:58:03Z",
  "challenges": [
    {
      "type": "http-01",
      "status": "pending",
      "url": "https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/12191505584/4V3C4Q",
      "token": "u7wWILCO7wIeur0QZVnLrKsd65AAdZafFfz3vuvamTo"
    },
    {
      "type": "dns-01",
      "status": "pending",
      "type": "tls-alpn-01",
      "status": "pending",
      "url": "https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/12191505584/83THPg",
      "token": "u7wWILCO7wIeur0QZVnLrKsd65AAdZafFfz3vuvamTo"
    }
  ]
}
2024-04-29 22:58:03,816:DEBUG:acme.client:Storing nonce: gP7UL-1gcMsWUdGYMAs0i-VYU1_bCnqbEneTxSuYDFm27_SUF5c
2024-04-29 22:58:03,817:INFO:certbot._internal.auth_handler:Performing the following challenges:
2024-04-29 22:58:03,818:INFO:certbot._internal.auth_handler:http-01 challenge for docmariaj.com
2024-04-29 22:58:03,823:DEBUG:certbot_apache._internal.http_01:Adding a temporary challenge validation Include for name: www.docmariaj.com in: /etc/httpd/conf.d/drmj.conf
2024-04-29 22:58:03,824:DEBUG:certbot_apache._internal.http_01:Adding a temporary challenge validation Include for name: www.docmariaj.com in: /etc/httpd/conf.d/drmj.conf
2024-04-29 22:58:03,824:DEBUG:certbot_apache._internal.http_01:Adding a temporary challenge validation Include for name: None in: /etc/httpd/conf.d/ssl.conf
2024-04-29 22:58:03,824:DEBUG:certbot_apache._internal.http_01:writing a pre config file with text:
         RewriteEngine on
        RewriteRule ^/\.well-known/acme-challenge/([A-Za-z0-9-_=]+)$ /var/lib/letsencrypt/http_challenges/$1 [END]

2024-04-29 22:58:03,825:DEBUG:certbot_apache._internal.http_01:writing a post config file with text:
         <Directory /var/lib/letsencrypt/http_challenges>
            Require all granted
        </Directory>
        <Location /.well-known/acme-challenge>
            Require all granted
        </Location>

2024-04-29 22:58:03,873:DEBUG:certbot.reverter:Creating backup of /etc/httpd/conf.d/ssl.conf
2024-04-29 22:58:03,874:DEBUG:certbot.reverter:Creating backup of /etc/httpd/conf.d/drmj.conf
2024-04-29 22:58:07,044:DEBUG:certbot._internal.display.obj:Notifying user: Challenges loaded. Press continue to submit to CA.

The following URLs should be accessible from the internet and return the value
Expected value:
u7wWILCO7wIeur0QZVnLrKsd65AAdZafFfz3vuvamTo._vG2tjEsgYCEpA0xZzVQFmGuCENx2kgRdmdYYW37WXY
2024-04-29 22:58:07,045:DEBUG:acme.client:JWS payload:
b'{}'
2024-04-29 22:58:07,047:DEBUG:acme.client:Sending POST request to https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/12191505584/4V3C4Q:
{
  "payload": "e30"
}
2024-04-29 22:58:07,112:DEBUG:urllib3.connectionpool:https://acme-staging-v02.api.letsencrypt.org:443 "POST /acme/chall-v3/12191505584/4V3C4Q HTTP/1.1" 200 194
2024-04-29 22:58:07,113:DEBUG:acme.client:Received response:
HTTP 200
Server: nginx
Date: Tue, 30 Apr 2024 02:58:07 GMT
Content-Type: application/json
Content-Length: 194
Connection: keep-alive
Boulder-Requester: 146393794
Cache-Control: public, max-age=0, no-cache
Link: <https://acme-staging-v02.api.letsencrypt.org/directory>;rel="index", <https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/12191505584>;rel="up"
Location: https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/12191505584/4V3C4Q
Replay-Nonce: vU6liGrnVd3SNEBOYoB2i-KOXewjCAkdnIFRIiMcwd9sScYMuUM
X-Frame-Options: DENY
Strict-Transport-Security: max-age=604800

{
  "type": "http-01",
  "status": "pending",
  "url": "https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/12191505584/4V3C4Q",
  "token": "u7wWILCO7wIeur0QZVnLrKsd65AAdZafFfz3vuvamTo"
}
2024-04-29 22:58:07,113:DEBUG:acme.client:Storing nonce: vU6liGrnVd3SNEBOYoB2i-KOXewjCAkdnIFRIiMcwd9sScYMuUM
2024-04-29 22:58:07,113:INFO:certbot._internal.auth_handler:Waiting for verification...
2024-04-29 22:58:08,115:DEBUG:acme.client:JWS payload:
b''
2024-04-29 22:58:08,117:DEBUG:acme.client:Sending POST request to https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/12191505584:
{
  "payload": ""
}
2024-04-29 22:58:08,171:DEBUG:urllib3.connectionpool:https://acme-staging-v02.api.letsencrypt.org:443 "POST /acme/authz-v3/12191505584 HTTP/1.1" 200 1145
2024-04-29 22:58:08,171:DEBUG:acme.client:Received response:
HTTP 200
Server: nginx
Date: Tue, 30 Apr 2024 02:58:08 GMT
Content-Type: application/json
Content-Length: 1145
Connection: keep-alive
Boulder-Requester: 146393794
Cache-Control: public, max-age=0, no-cache
Link: <https://acme-staging-v02.api.letsencrypt.org/directory>;rel="index"
Replay-Nonce: vU6liGrndjd3GQccW8aA6RIUOJA09WXcabHX6rQ7KstNfuja5oc
X-Frame-Options: DENY
Strict-Transport-Security: max-age=604800

{
  "identifier": {
    "type": "dns",
    "value": "docmariaj.com"
  },
  "status": "invalid",
  "expires": "2024-05-07T02:58:03Z",
  "challenges": [
    {
      "type": "http-01",
      "status": "invalid",
      "error": {
        "type": "urn:ietf:params:acme:error:unauthorized",
        "detail": "178.128.228.102: Invalid response from http://docmariaj.com/.well-known/acme-challenge/u7wWILCO7wIeur0QZVnLrKsd65AAdZafFfz3vuvamTo: 400",
        "status": 403
      },
      "url": "https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/12191505584/4V3C4Q",
      "token": "u7wWILCO7wIeur0QZVnLrKsd65AAdZafFfz3vuvamTo",
      "validationRecord": [
        {
          "url": "http://docmariaj.com/.well-known/acme-challenge/u7wWILCO7wIeur0QZVnLrKsd65AAdZafFfz3vuvamTo",
          "hostname": "docmariaj.com",
          "port": "80",
          "addressesResolved": [
            "178.128.228.102"
          ],
          "addressUsed": "178.128.228.102",
          "resolverAddrs": [
            "A:10.0.32.85:28460",
            "AAAA:10.0.32.88:27567"
          ]
        }
      ],
      "validated": "2024-04-30T02:58:07Z"
    }
  ]
}
2024-04-29 22:58:08,171:DEBUG:acme.client:Storing nonce: vU6liGrndjd3GQccW8aA6RIUOJA09WXcabHX6rQ7KstNfuja5oc
2024-04-29 22:58:08,172:INFO:certbot._internal.auth_handler:Challenge failed for domain docmariaj.com
2024-04-29 22:58:08,172:INFO:certbot._internal.auth_handler:http-01 challenge for docmariaj.com
2024-04-29 22:58:08,172:DEBUG:certbot._internal.display.obj:Notifying user:
Certbot failed to authenticate some domains (authenticator: apache). The Certificate Authority reported these problems:
  Domain: docmariaj.com
  Type:   unauthorized
  Detail: 178.128.228.102: Invalid response from http://docmariaj.com/.well-known/acme-challenge/u7wWILCO7wIeur0QZVnLrKsd65AAdZafFfz3vuvamTo: 400

Hint: The Certificate Authority failed to verify the temporary Apache configuration changes made by Certbot. Ensure that the listed domains point to this Apache server and that it is accessible from the internet.

2024-04-29 22:58:08,173:DEBUG:certbot._internal.error_handler:Encountered exception:
Traceback (most recent call last):
  File "/var/lib/snapd/snap/certbot/3700/lib/python3.8/site-packages/certbot/_internal/auth_handler.py", line 108, in handle_authorizations
    self._poll_authorizations(authzrs, max_retries, max_time_mins, best_effort)
  File "/var/lib/snapd/snap/certbot/3700/lib/python3.8/site-packages/certbot/_internal/auth_handler.py", line 212, in _poll_authorizations
    raise errors.AuthorizationError('Some challenges have failed.')
2024-04-29 22:58:02,744:DEBUG:urllib3.connectionpool:http://localhost:None "GET /v2/connections?snap=certbot&interface=content HTTP/1.1" 200 97
2024-04-29 22:58:02,909:DEBUG:certbot._internal.main:certbot version: 2.10.0
2024-04-29 22:58:02,910:DEBUG:certbot._internal.main:Location of certbot entry point: /snap/certbot/3700/bin/certbot
2024-04-29 22:58:02,910:DEBUG:certbot._internal.main:Arguments: ['--dry-run', '--debug-challenges', '-v', '--preconfigured-renewal']
2024-04-29 22:58:02,930:DEBUG:certbot._internal.log:Root logging level set at 20
2024-04-29 22:58:02,932:DEBUG:certbot._internal.display.obj:Notifying user: Processing /etc/letsencrypt/renewal/docmariaj.com.conf
2024-04-29 22:58:02,934:DEBUG:certbot.configuration:Var server=https://acme-staging-v02.api.letsencrypt.org/directory (set by user).
2024-04-29 22:58:02,934:DEBUG:certbot.configuration:Var account=None (set by user).
2024-04-29 22:58:02,934:DEBUG:certbot._internal.plugins.selection:Requested authenticator None and installer None
2024-04-29 22:58:02,934:DEBUG:certbot._internal.plugins.selection:Requested authenticator None and installer None
2024-04-29 22:58:02,955:DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): r3.o.lencr.org:80
2024-04-29 22:58:03,017:DEBUG:urllib3.connectionpool:http://r3.o.lencr.org:80 "POST / HTTP/1.1" 200 503
2024-04-29 22:58:03,018:DEBUG:certbot.ocsp:OCSP response for certificate /etc/letsencrypt/archive/docmariaj.com/cert1.pem is signed by the certificate's issuer.
2024-04-29 22:58:03,019:DEBUG:certbot.ocsp:OCSP certificate status for /etc/letsencrypt/archive/docmariaj.com/cert1.pem is: OCSPCertStatus.GOOD
2024-04-29 22:58:03,023:DEBUG:certbot._internal.storage:Should renew, less than 30 days before certificate expiry 2024-05-18 22:22:07 UTC.
2024-04-29 22:58:03,023:INFO:certbot._internal.renewal:Certificate is due for renewal, auto-renewing...
2024-04-29 22:58:03,023:DEBUG:certbot._internal.plugins.selection:Requested authenticator apache and installer apache
2024-04-29 22:58:03,123:DEBUG:certbot_apache._internal.configurator:Apache version is 2.4.57
2024-04-29 22:58:03,365:DEBUG:certbot._internal.plugins.selection:Single candidate plugin: * apache
Description: Apache Web Server plugin
Interfaces: Authenticator, Installer, Plugin
Entry point: EntryPoint(name='apache', value='certbot_apache._internal.entrypoint:ENTRYPOINT', group='certbot.plugins')
Initialized: <certbot_apache._internal.override_centos.CentOSConfigurator object at 0x7fbe615990a0>
Prep: True
2024-04-29 22:58:03,366:DEBUG:certbot._internal.plugins.selection:Single candidate plugin: * apache
Description: Apache Web Server plugin
Interfaces: Authenticator, Installer, Plugin
Entry point: EntryPoint(name='apache', value='certbot_apache._internal.entrypoint:ENTRYPOINT', group='certbot.plugins')
Initialized: <certbot_apache._internal.override_centos.CentOSConfigurator object at 0x7fbe615990a0>
Prep: True
2024-04-29 22:58:03,366:INFO:certbot._internal.plugins.selection:Plugins selected: Authenticator apache, Installer apache
2024-04-29 22:58:03,432:DEBUG:acme.client:Sending GET request to https://acme-staging-v02.api.letsencrypt.org/directory.
2024-04-29 22:58:03,458:DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): acme-staging-v02.api.letsencrypt.org:443
2024-04-29 22:58:03,601:DEBUG:urllib3.connectionpool:https://acme-staging-v02.api.letsencrypt.org:443 "GET /directory HTTP/1.1" 200 821
2024-04-29 22:58:03,601:DEBUG:acme.client:Received response:
HTTP 200
Server: nginx
Date: Tue, 30 Apr 2024 02:58:03 GMT
X-Frame-Options: DENY
Strict-Transport-Security: max-age=604800

{
  "XjpIh54HFno": "https://community.letsencrypt.org/t/adding-random-entries-to-the-directory/33417",
  "keyChange": "https://acme-staging-v02.api.letsencrypt.org/acme/key-change",
  "meta": {
    "caaIdentities": [
      "letsencrypt.org"
    ],
    "termsOfService": "https://letsencrypt.org/documents/LE-SA-v1.4-April-3-2024.pdf",
    "website": "https://letsencrypt.org/docs/staging-environment/"
  },
  "newAccount": "https://acme-staging-v02.api.letsencrypt.org/acme/new-acct",
  "newNonce": "https://acme-staging-v02.api.letsencrypt.org/acme/new-nonce",
  "newOrder": "https://acme-staging-v02.api.letsencrypt.org/acme/new-order",
  "renewalInfo": "https://acme-staging-v02.api.letsencrypt.org/draft-ietf-acme-ari-02/renewalInfo/",
  "revokeCert": "https://acme-staging-v02.api.letsencrypt.org/acme/revoke-cert"
}
2024-04-29 22:58:03,603:DEBUG:certbot._internal.display.obj:Notifying user: Simulating renewal of an existing certificate for docmariaj.com
2024-04-29 22:58:03,606:DEBUG:acme.client:Requesting fresh nonce
2024-04-29 22:58:03,606:DEBUG:acme.client:Sending HEAD request to https://acme-staging-v02.api.letsencrypt.org/acme/new-nonce.
2024-04-29 22:58:03,653:DEBUG:urllib3.connectionpool:https://acme-staging-v02.api.letsencrypt.org:443 "HEAD /acme/new-nonce HTTP/1.1" 200 0
2024-04-29 22:58:03,654:DEBUG:acme.client:Received response:
HTTP 200
Server: nginx
Date: Tue, 30 Apr 2024 02:58:03 GMT
Connection: keep-alive
Cache-Control: public, max-age=0, no-cache
Link: <https://acme-staging-v02.api.letsencrypt.org/directory>;rel="index"
Replay-Nonce: vU6liGrnrOaq49saNQY_9NraAQRtGMM6p2RlcS-EAIHwRBLhzb0
X-Frame-Options: DENY
Strict-Transport-Security: max-age=604800


2024-04-29 22:58:03,655:DEBUG:acme.client:Storing nonce: vU6liGrnrOaq49saNQY_9NraAQRtGMM6p2RlcS-EAIHwRBLhzb0
2024-04-29 22:58:03,655:DEBUG:acme.client:JWS payload:
  "payload": "ewogICJpZGVudGlmaWVycyI6IFsKICAgIHsKICAgICAgInR5cGUiOiAiZG5zIiwKICAgICAgInZhbHVlIjogImRvY21hcmlhai5jb20iCiAgICB9CiAgXQp9"
}
2024-04-29 22:58:03,757:DEBUG:urllib3.connectionpool:https://acme-staging-v02.api.letsencrypt.org:443 "POST /acme/new-order HTTP/1.1" 201 352
2024-04-29 22:58:03,758:DEBUG:acme.client:Received response:
HTTP 201
Server: nginx
Date: Tue, 30 Apr 2024 02:58:03 GMT
Content-Type: application/json
Content-Length: 352
Connection: keep-alive
Boulder-Requester: 146393794
Cache-Control: public, max-age=0, no-cache
Link: <https://acme-staging-v02.api.letsencrypt.org/directory>;rel="index"
Location: https://acme-staging-v02.api.letsencrypt.org/acme/order/146393794/16231208414
Replay-Nonce: gP7UL-1g2AK8vei67u-BXd1-luCvZlbKam-TffR-yuv0gg9iylw
X-Frame-Options: DENY
Strict-Transport-Security: max-age=604800

{
  "status": "pending",
  "expires": "2024-05-07T02:58:03Z",
  "identifiers": [
    {
      "type": "dns",
      "value": "docmariaj.com"
    }
  ],
  "authorizations": [
    "https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/12191505584"
  ],
  "finalize": "https://acme-staging-v02.api.letsencrypt.org/acme/finalize/146393794/16231208414"
}
2024-04-29 22:58:03,758:DEBUG:acme.client:Storing nonce: gP7UL-1g2AK8vei67u-BXd1-luCvZlbKam-TffR-yuv0gg9iylw
2024-04-29 22:58:03,758:DEBUG:acme.client:JWS payload:
b''
2024-04-29 22:58:03,761:DEBUG:acme.client:Sending POST request to https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/12191505584:
{
  "payload": ""
}
2024-04-29 22:58:03,815:DEBUG:urllib3.connectionpool:https://acme-staging-v02.api.letsencrypt.org:443 "POST /acme/authz-v3/12191505584 HTTP/1.1" 200 818
2024-04-29 22:58:03,816:DEBUG:acme.client:Received response:
HTTP 200
Server: nginx
Date: Tue, 30 Apr 2024 02:58:03 GMT
Content-Type: application/json
Content-Length: 818
Connection: keep-alive
Boulder-Requester: 146393794
Cache-Control: public, max-age=0, no-cache
Link: <https://acme-staging-v02.api.letsencrypt.org/directory>;rel="index"
Replay-Nonce: gP7UL-1gcMsWUdGYMAs0i-VYU1_bCnqbEneTxSuYDFm27_SUF5c
X-Frame-Options: DENY
Strict-Transport-Security: max-age=604800

{
  "identifier": {
    "type": "dns",
    "value": "docmariaj.com"
  },
  "status": "pending",
  "expires": "2024-05-07T02:58:03Z",
  "challenges": [
    {
      "type": "http-01",
      "status": "pending",
      "url": "https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/12191505584/4V3C4Q",
      "token": "u7wWILCO7wIeur0QZVnLrKsd65AAdZafFfz3vuvamTo"
    },
    {
      "type": "dns-01",
      "status": "pending",
      "type": "tls-alpn-01",
      "status": "pending",
      "url": "https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/12191505584/83THPg",
      "token": "u7wWILCO7wIeur0QZVnLrKsd65AAdZafFfz3vuvamTo"
    }
  ]
}
2024-04-29 22:58:03,816:DEBUG:acme.client:Storing nonce: gP7UL-1gcMsWUdGYMAs0i-VYU1_bCnqbEneTxSuYDFm27_SUF5c
2024-04-29 22:58:03,817:INFO:certbot._internal.auth_handler:Performing the following challenges:
2024-04-29 22:58:03,818:INFO:certbot._internal.auth_handler:http-01 challenge for docmariaj.com
2024-04-29 22:58:03,823:DEBUG:certbot_apache._internal.http_01:Adding a temporary challenge validation Include for name: www.docmariaj.com in: /etc/httpd/conf.d/drmj.conf
2024-04-29 22:58:03,824:DEBUG:certbot_apache._internal.http_01:Adding a temporary challenge validation Include for name: www.docmariaj.com in: /etc/httpd/conf.d/drmj.conf
2024-04-29 22:58:03,824:DEBUG:certbot_apache._internal.http_01:Adding a temporary challenge validation Include for name: None in: /etc/httpd/conf.d/ssl.conf
2024-04-29 22:58:03,824:DEBUG:certbot_apache._internal.http_01:writing a pre config file with text:
         RewriteEngine on
        RewriteRule ^/\.well-known/acme-challenge/([A-Za-z0-9-_=]+)$ /var/lib/letsencrypt/http_challenges/$1 [END]

2024-04-29 22:58:03,825:DEBUG:certbot_apache._internal.http_01:writing a post config file with text:
         <Directory /var/lib/letsencrypt/http_challenges>
            Require all granted
        </Directory>
        <Location /.well-known/acme-challenge>
            Require all granted
        </Location>

2024-04-29 22:58:03,873:DEBUG:certbot.reverter:Creating backup of /etc/httpd/conf.d/ssl.conf
2024-04-29 22:58:03,874:DEBUG:certbot.reverter:Creating backup of /etc/httpd/conf.d/drmj.conf
2024-04-29 22:58:07,044:DEBUG:certbot._internal.display.obj:Notifying user: Challenges loaded. Press continue to submit to CA.

The following URLs should be accessible from the internet and return the value
Expected value:
u7wWILCO7wIeur0QZVnLrKsd65AAdZafFfz3vuvamTo._vG2tjEsgYCEpA0xZzVQFmGuCENx2kgRdmdYYW37WXY
2024-04-29 22:58:07,045:DEBUG:acme.client:JWS payload:
b'{}'
2024-04-29 22:58:07,047:DEBUG:acme.client:Sending POST request to https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/12191505584/4V3C4Q:
{
  "payload": "e30"
}
2024-04-29 22:58:07,112:DEBUG:urllib3.connectionpool:https://acme-staging-v02.api.letsencrypt.org:443 "POST /acme/chall-v3/12191505584/4V3C4Q HTTP/1.1" 200 194
2024-04-29 22:58:07,113:DEBUG:acme.client:Received response:
HTTP 200
Server: nginx
Date: Tue, 30 Apr 2024 02:58:07 GMT
Content-Type: application/json
Content-Length: 194
Connection: keep-alive
Boulder-Requester: 146393794
Cache-Control: public, max-age=0, no-cache
Link: <https://acme-staging-v02.api.letsencrypt.org/directory>;rel="index", <https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/12191505584>;rel="up"
Location: https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/12191505584/4V3C4Q
Replay-Nonce: vU6liGrnVd3SNEBOYoB2i-KOXewjCAkdnIFRIiMcwd9sScYMuUM
X-Frame-Options: DENY
Strict-Transport-Security: max-age=604800

{
  "type": "http-01",
  "status": "pending",
  "url": "https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/12191505584/4V3C4Q",
  "token": "u7wWILCO7wIeur0QZVnLrKsd65AAdZafFfz3vuvamTo"
}
2024-04-29 22:58:07,113:DEBUG:acme.client:Storing nonce: vU6liGrnVd3SNEBOYoB2i-KOXewjCAkdnIFRIiMcwd9sScYMuUM
2024-04-29 22:58:07,113:INFO:certbot._internal.auth_handler:Waiting for verification...
2024-04-29 22:58:08,115:DEBUG:acme.client:JWS payload:
b''
2024-04-29 22:58:08,117:DEBUG:acme.client:Sending POST request to https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/12191505584:
{
  "payload": ""
}
2024-04-29 22:58:08,171:DEBUG:urllib3.connectionpool:https://acme-staging-v02.api.letsencrypt.org:443 "POST /acme/authz-v3/12191505584 HTTP/1.1" 200 1145
2024-04-29 22:58:08,171:DEBUG:acme.client:Received response:
HTTP 200
Server: nginx
Date: Tue, 30 Apr 2024 02:58:08 GMT
Content-Type: application/json
Content-Length: 1145
Connection: keep-alive
Boulder-Requester: 146393794
Cache-Control: public, max-age=0, no-cache
Link: <https://acme-staging-v02.api.letsencrypt.org/directory>;rel="index"
Replay-Nonce: vU6liGrndjd3GQccW8aA6RIUOJA09WXcabHX6rQ7KstNfuja5oc
X-Frame-Options: DENY
Strict-Transport-Security: max-age=604800

{
  "identifier": {
    "type": "dns",
    "value": "docmariaj.com"
  },
  "status": "invalid",
  "expires": "2024-05-07T02:58:03Z",
  "challenges": [
    {
      "type": "http-01",
      "status": "invalid",
      "error": {
        "type": "urn:ietf:params:acme:error:unauthorized",
        "detail": "178.128.228.102: Invalid response from http://docmariaj.com/.well-known/acme-challenge/u7wWILCO7wIeur0QZVnLrKsd65AAdZafFfz3vuvamTo: 400",
        "status": 403
      },
      "url": "https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/12191505584/4V3C4Q",
      "token": "u7wWILCO7wIeur0QZVnLrKsd65AAdZafFfz3vuvamTo",
      "validationRecord": [
        {
          "url": "http://docmariaj.com/.well-known/acme-challenge/u7wWILCO7wIeur0QZVnLrKsd65AAdZafFfz3vuvamTo",
          "hostname": "docmariaj.com",
          "port": "80",
          "addressesResolved": [
            "178.128.228.102"
          ],
          "addressUsed": "178.128.228.102",
          "resolverAddrs": [
            "A:10.0.32.85:28460",
            "AAAA:10.0.32.88:27567"
          ]
        }
      ],
      "validated": "2024-04-30T02:58:07Z"
    }
  ]
}
2024-04-29 22:58:08,171:DEBUG:acme.client:Storing nonce: vU6liGrndjd3GQccW8aA6RIUOJA09WXcabHX6rQ7KstNfuja5oc
2024-04-29 22:58:08,172:INFO:certbot._internal.auth_handler:Challenge failed for domain docmariaj.com
2024-04-29 22:58:08,172:INFO:certbot._internal.auth_handler:http-01 challenge for docmariaj.com
2024-04-29 22:58:08,172:DEBUG:certbot._internal.display.obj:Notifying user:
Certbot failed to authenticate some domains (authenticator: apache). The Certificate Authority reported these problems:
  Domain: docmariaj.com
  Type:   unauthorized
  Detail: 178.128.228.102: Invalid response from http://docmariaj.com/.well-known/acme-challenge/u7wWILCO7wIeur0QZVnLrKsd65AAdZafFfz3vuvamTo: 400

Hint: The Certificate Authority failed to verify the temporary Apache configuration changes made by Certbot. Ensure that the listed domains point to this Apache server and that it is accessible from the internet.

2024-04-29 22:58:08,173:DEBUG:certbot._internal.error_handler:Encountered exception:
Traceback (most recent call last):
  File "/var/lib/snapd/snap/certbot/3700/lib/python3.8/site-packages/certbot/_internal/auth_handler.py", line 108, in handle_authorizations
    self._poll_authorizations(authzrs, max_retries, max_time_mins, best_effort)
  File "/var/lib/snapd/snap/certbot/3700/lib/python3.8/site-packages/certbot/_internal/auth_handler.py", line 212, in _poll_authorizations
    raise errors.AuthorizationError('Some challenges have failed.')
    "type": "dns",
    "value": "docmariaj.com"
  },
  "status": "invalid",
  "expires": "2024-05-07T02:58:03Z",
  "challenges": [
    {
      "type": "http-01",
      "status": "invalid",
      "error": {
        "type": "urn:ietf:params:acme:error:unauthorized",
        "detail": "178.128.228.102: Invalid response from http://docmariaj.com/.well-known/acme-challenge/u7wWILCO7wIeur0QZVnLrKsd65AAdZafFfz3vuvamTo: 400",
        "status": 403
      },
      "url": "https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/12191505584/4V3C4Q",
      "token": "u7wWILCO7wIeur0QZVnLrKsd65AAdZafFfz3vuvamTo",
      "validationRecord": [
        {
          "url": "http://docmariaj.com/.well-known/acme-challenge/u7wWILCO7wIeur0QZVnLrKsd65AAdZafFfz3vuvamTo",
          "hostname": "docmariaj.com",
          "port": "80",
          "addressesResolved": [
            "178.128.228.102"
  "challenges": [
    {
      "type": "http-01",
      "status": "invalid",
      "error": {
        "type": "urn:ietf:params:acme:error:unauthorized",
        "detail": "178.128.228.102: Invalid response from http://docmariaj.com/.well-known/acme-challenge/u7wWILCO7wIeur0QZVnLrKsd65AAdZafFfz3vuvamTo: 400",
        "status": 403
      },
      "url": "https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/12191505584/4V3C4Q",
      "token": "u7wWILCO7wIeur0QZVnLrKsd65AAdZafFfz3vuvamTo",
      "validationRecord": [
        {
          "url": "http://docmariaj.com/.well-known/acme-challenge/u7wWILCO7wIeur0QZVnLrKsd65AAdZafFfz3vuvamTo",
          "hostname": "docmariaj.com",
          "port": "80",
          "addressesResolved": [
            "178.128.228.102"
          ],
          "addressUsed": "178.128.228.102",
          "resolverAddrs": [
            "A:10.0.32.85:28460",
            "AAAA:10.0.32.88:27567"
          ]
        }
      ],
      "validated": "2024-04-30T02:58:07Z"
    }
  ]
}
2024-04-29 22:58:08,171:DEBUG:acme.client:Storing nonce: vU6liGrndjd3GQccW8aA6RIUOJA09WXcabHX6rQ7KstNfuja5oc
2024-04-29 22:58:08,172:INFO:certbot._internal.auth_handler:Challenge failed for domain docmariaj.com
2024-04-29 22:58:08,172:INFO:certbot._internal.auth_handler:http-01 challenge for docmariaj.com
2024-04-29 22:58:08,172:DEBUG:certbot._internal.display.obj:Notifying user:
Certbot failed to authenticate some domains (authenticator: apache). The Certificate Authority reported these problems:
  Domain: docmariaj.com
  Type:   unauthorized
  Detail: 178.128.228.102: Invalid response from http://docmariaj.com/.well-known/acme-challenge/u7wWILCO7wIeur0QZVnLrKsd65AAdZafFfz3vuvamTo: 400

Hint: The Certificate Authority failed to verify the temporary Apache configuration changes made by Certbot. Ensure that the listed domains point to this Apache server and that it is accessible from the internet.

2024-04-29 22:58:08,173:DEBUG:certbot._internal.error_handler:Encountered exception:
Traceback (most recent call last):
  File "/var/lib/snapd/snap/certbot/3700/lib/python3.8/site-packages/certbot/_internal/auth_handler.py", line 108, in handle_authorizations
    self._poll_authorizations(authzrs, max_retries, max_time_mins, best_effort)
  File "/var/lib/snapd/snap/certbot/3700/lib/python3.8/site-packages/certbot/_internal/auth_handler.py", line 212, in _poll_authorizations
    raise errors.AuthorizationError('Some challenges have failed.')

My web server is (include version):

Server version: Apache/2.4.57 (CentOS Stream)
Server built: Oct 4 2023 00:00:00

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

CentOS Stream release 9

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don't know):

Yes

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):

certbot 2.10.0

I was able to get my certificate installed easily on this new server like more than 2 months ago. Now it is up for renewal and I'm getting issues. I tried to read several similar cases but wasn't able to figure it out.

Thanks for looking into this.

1 Like

As with most things Apache [on this forum], I like to begin at the beginning, with the output of:
sudo apachectl -t -D DUMP_VHOSTS

2 Likes

Thanks!
This is what I get from running that command:

Passing arguments to httpd using apachectl is no longer supported.
You can only start/stop/restart httpd using this script.
To pass extra arguments to httpd, see the httpd.service(8)
man page.

1 Like

sudo httpd -t -D DUMP_VHOSTS

AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using ::1. Set the 'ServerName' directive globally to suppress this message
VirtualHost configuration:
178.128.228.102:443 www.docmariaj.com (/etc/httpd/conf.d/drmj.conf:1)
178.128.228.102:80 www.docmariaj.com (/etc/httpd/conf.d/drmj.conf:12)
*:443 ::1 (/etc/httpd/conf.d/ssl.conf:40)

We should have a look at both of those files.

2 Likes

Sure. It's actually only one. I added the second section when I saw "http://.." error.

<VirtualHost 178.128.228.102:443>
    ServerName www.docmariaj.com
    ServerAlias docmariaj.com
    DocumentRoot /var/www/html/drmj
    ErrorLog /var/www/html/drmj/error.log
    CustomLog /var/www/html/drmj/requests.log combined
    SSLEngine on
    SSLCertificateFile /etc/letsencrypt/live/docmariaj.com/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/docmariaj.com/privkey.pem
</VirtualHost>

<VirtualHost 178.128.228.102:80>
    ServerName www.docmariaj.com
    ServerAlias docmariaj.com
    DocumentRoot /var/www/html/drmj
    ErrorLog /var/www/html/drmj/error.log
    CustomLog /var/www/html/drmj/requests.log combined
    SSLEngine on
    SSLCertificateFile /etc/letsencrypt/live/docmariaj.com/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/docmariaj.com/privkey.pem
</VirtualHost>

I meant both files:

2 Likes

Using the IP in the vhost definition is not necessary and can lead to problems.
I'd switch those two to:

<VirtualHost *:443>
<VirtualHost *:80>
3 Likes

You define the "www", but there is no IP in DNS for it:
can't find www.docmariaj.com: Non-existent domain

If you intend on using it [which you should - about half the people still type "www"], you should define it in DNS and get a cert with both those names on it.

2 Likes

... apologies! Here's /etc/httpd/conf.d/ssl.conf :

#
# When we also provide SSL we have to listen to the 
# standard HTTPS port in addition.
#
Listen 443 https

##
##  SSL Global Context
##
##  All SSL configuration in this context applies both to
##  the main server and all SSL-enabled virtual hosts.
##

#   Pass Phrase Dialog:
#   Configure the pass phrase gathering process.
#   The filtering dialog program (`builtin' is a internal
#   terminal dialog) has to provide the pass phrase on stdout.
SSLPassPhraseDialog exec:/usr/libexec/httpd-ssl-pass-dialog

#   Inter-Process Session Cache:
#   Configure the SSL Session Cache: First the mechanism 
#   to use and second the expiring timeout (in seconds).
SSLSessionCache         shmcb:/run/httpd/sslcache(512000)
SSLSessionCacheTimeout  300

#
# Use "SSLCryptoDevice" to enable any supported hardware
# accelerators. Use "openssl engine -v" to list supported
# engine names.  NOTE: If you enable an accelerator and the
# server does not start, consult the error logs and ensure
# your accelerator is functioning properly. 
#
SSLCryptoDevice builtin
#SSLCryptoDevice ubsec

##
## SSL Virtual Host Context
##

<VirtualHost _default_:443>

# General setup for the virtual host, inherited from global configuration
#DocumentRoot "/var/www/html"
#ServerName www.example.com:443

# Use separate log files for the SSL virtual host; note that LogLevel
# is not inherited from httpd.conf.
ErrorLog logs/ssl_error_log
TransferLog logs/ssl_access_log
LogLevel warn

#   SSL Engine Switch:
#   Enable/Disable SSL for this virtual host.
SSLEngine on

#   List the protocol versions which clients are allowed to connect with.
#   The OpenSSL system profile is used by default.  See
#   update-crypto-policies(8) for more details.
#SSLProtocol all -SSLv3
#SSLProxyProtocol all -SSLv3

#   User agents such as web browsers are not configured for the user's
#   own preference of either security or performance, therefore this
#   must be the prerogative of the web server administrator who manages
#   cpu load versus confidentiality, so enforce the server's cipher order.
SSLHonorCipherOrder on

#   SSL Cipher Suite:
#   List the ciphers that the client is permitted to negotiate.
#   See the mod_ssl documentation for a complete list.
#   The OpenSSL system profile is configured by default.  See
#   update-crypto-policies(8) for more details.
SSLCipherSuite PROFILE=SYSTEM
SSLProxyCipherSuite PROFILE=SYSTEM

#   Point SSLCertificateFile at a PEM encoded certificate.  If
#   the certificate is encrypted, then you will be prompted for a
#   pass phrase.  Note that restarting httpd will prompt again.  Keep
#   in mind that if you have both an RSA and a DSA certificate you
#   can configure both in parallel (to also allow the use of DSA
#   ciphers, etc.)
#   Some ECC cipher suites (http://www.ietf.org/rfc/rfc4492.txt)
#   require an ECC certificate which can also be configured in
#   parallel.
SSLCertificateFile /etc/pki/tls/certs/localhost.crt

#   Server Private Key:
#   If the key is not combined with the certificate, use this
#   directive to point at the key file.  Keep in mind that if
#   you've both a RSA and a DSA private key you can configure
#   both in parallel (to also allow the use of DSA ciphers, etc.)
#   ECC keys, when in use, can also be configured in parallel
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key

#   Server Certificate Chain:
#   Point SSLCertificateChainFile at a file containing the
#   concatenation of PEM encoded CA certificates which form the
#   certificate chain for the server certificate. Alternatively
#   the referenced file can be the same as SSLCertificateFile
#   when the CA certificates are directly appended to the server
#   certificate for convenience.
#SSLCertificateChainFile /etc/pki/tls/certs/server-chain.crt

#   Certificate Authority (CA):
#   Set the CA certificate verification path where to find CA
#   certificates for client authentication or alternatively one
#   huge file containing all of them (file must be PEM encoded)
#SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt

#   Client Authentication (Type):
#   Client certificate verification type and depth.  Types are
#   none, optional, require and optional_no_ca.  Depth is a
#   number which specifies how deeply to verify the certificate
#   issuer chain before deciding the certificate is not valid.
#SSLVerifyClient require
#SSLVerifyDepth  10

#   Access Control:
#   With SSLRequire you can do per-directory access control based
#   on arbitrary complex boolean expressions containing server
#   variable checks and other lookup directives.  The syntax is a
#   mixture between C and Perl.  See the mod_ssl documentation
#   for more details.
#<Location />
#SSLRequire (    %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
#            and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
#            and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
#            and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
#            and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20       ) \
#           or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
#</Location>

#   SSL Engine Options:
#   Set various options for the SSL engine.
#   o FakeBasicAuth:
#     Translate the client X.509 into a Basic Authorisation.  This means that
#     the standard Auth/DBMAuth methods can be used for access control.  The
#     user name is the `one line' version of the client's X.509 certificate.
#     Note that no password is obtained from the user. Every entry in the user
#     file needs this password: `xxj31ZMTZzkVA'.
#   o ExportCertData:
#     This exports two additional environment variables: SSL_CLIENT_CERT and
#     SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
#     server (always existing) and the client (only existing when client
#     authentication is used). This can be used to import the certificates
#     into CGI scripts.
#   o StdEnvVars:
#     This exports the standard SSL/TLS related `SSL_*' environment variables.
#     Per default this exportation is switched off for performance reasons,
#     because the extraction step is an expensive operation and is usually
#     useless for serving static content. So one usually enables the
#     exportation for CGI and SSI requests only.
#   o StrictRequire:
#     This denies access when "SSLRequireSSL" or "SSLRequire" applied even
#     under a "Satisfy any" situation, i.e. when it applies access is denied
#     and no other module can change it.
#   o OptRenegotiate:
#     This enables optimized SSL connection renegotiation handling when SSL
#     directives are used in per-directory context. 
#SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
<FilesMatch "\.(cgi|shtml|phtml|php)$">
    SSLOptions +StdEnvVars
</FilesMatch>
<Directory "/var/www/cgi-bin">
    SSLOptions +StdEnvVars
</Directory>

#   SSL Protocol Adjustments:
#   The safe and default but still SSL/TLS standard compliant shutdown
#   approach is that mod_ssl sends the close notify alert but doesn't wait for
#   the close notify alert from client. When you need a different shutdown
#   approach you can use one of the following variables:
#   o ssl-unclean-shutdown:
#     This forces an unclean shutdown when the connection is closed, i.e. no
#     SSL close notify alert is sent or allowed to be received.  This violates
#     the SSL/TLS standard but is needed for some brain-dead browsers. Use
#     this when you receive I/O errors because of the standard approach where
#     mod_ssl sends the close notify alert.
#   o ssl-accurate-shutdown:
#     This forces an accurate shutdown when the connection is closed, i.e. a
#     SSL close notify alert is sent and mod_ssl waits for the close notify
#     alert of the client. This is 100% SSL/TLS standard compliant, but in
#     practice often causes hanging connections with brain-dead browsers. Use
#     this only for browsers where you know that their SSL implementation
#     works correctly. 
#   Notice: Most problems of broken clients are also related to the HTTP
#   keep-alive facility, so you usually additionally want to disable
#   keep-alive for those clients, too. Use variable "nokeepalive" for this.
#   Similarly, one has to force some clients to use HTTP/1.0 to workaround
#   their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
#   "force-response-1.0" for this.
BrowserMatch "MSIE [2-5]" \
         nokeepalive ssl-unclean-shutdown \
         downgrade-1.0 force-response-1.0

#   Per-Server Logging:
#   The home of a custom SSL log file. Use this when you want a
#   compact non-error SSL logfile on a virtual host basis.
CustomLog logs/ssl_request_log \
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

</VirtualHost>
2 Likes

OK, let's leave that "ssl.conf" file alone it doesn't appear to be causing any harm [and there are some things in there that are globally necessary].

2 Likes
curl docmariaj.com/.well-known/acme-challenge/Test_File-1234
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
Reason: You're speaking plain HTTP to an SSL-enabled server port.<br />
 Instead use the HTTPS scheme to access this URL, please.<br />
</p>
</body></html>
2 Likes

Done. I also removed the IP

1 Like

After httpd restarted, I tried

sudo certbot renew --dry-run

and I got:

Saving debug log to /var/log/letsencrypt/letsencrypt.log


Processing /etc/letsencrypt/renewal/docmariaj.com.conf


Simulating renewal of an existing certificate for docmariaj.com


Congratulations, all simulated renewals succeeded:
/etc/letsencrypt/live/docmariaj.com/fullchain.pem (success)


However, my certificate still show it's valid for just a few days, if I read correctly, this seems to be just a simulation ... Did I miss something?

Thanks, @rg305

2 Likes

That's the whole purpose of the --dry-run option, simulating.

5 Likes

All set!

Thank you very much @Osiris and @rg305

Amazing job!

4 Likes

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