Here are some dumps from the letsencrypt.log as well as apachectl -S
I should note that I have been running just the run command ie "sudo certbot" then at the prompt choosing the number that corresponds to the domain I want the cert for. On the ones that worked it was magic. The certs were created and the vhost files were updated with all the relevant changes and everything just worked. Those website now redirected all requests to https and all is good. But some of these other ones just fail to get and install the cert no matter what I try.
I have checked Let’s debug and it says everything should work.
I can load http://vmarmachine.shop/.well-known/acme-challenge/
with no issues. (I had to manually create those directories so I could test it)
I have run certbot on several other domains on this same machine. In the vhosts file they all are setup basically the same, yet some work and other give this same “unauthorized” error. I struggling to figure out what might be different between the ones that work and the ones that don’t. I even have a few that the domain level cert worked fine, but I cannot —expand to add the “www” third level to the cert. I get the same unauthorized error. All the domains have their DNS hosted at AWS and are all setup the same. Simple DNS, nothing too fancy.
From /var/log/letsencrypt/letsencrypt.log
2022-11-16 15:59:51,952:DEBUG:certbot._internal.main:certbot version: 1.32.0
2022-11-16 15:59:51,952:DEBUG:certbot._internal.main:Location of certbot entry point: /opt/homebrew/bin/certbot
2022-11-16 15:59:51,952:DEBUG:certbot._internal.main:Arguments:
2022-11-16 15:59:51,952:DEBUG:certbot._internal.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#apache,PluginEntryPoint#manual,PluginEntryPoint#nginx,PluginEntryPoint#null,Plug$
2022-11-16 15:59:51,968:DEBUG:certbot._internal.log:Root logging level set at 30
2022-11-16 15:59:51,968:DEBUG:certbot._internal.plugins.selection:Requested authenticator None and installer None
2022-11-16 15:59:52,111:DEBUG:certbot_apache._internal.configurator:Apache version is 2.4.53
2022-11-16 15:59:52,367:DEBUG:certbot_apache._internal.configurator:[Errno 2] No such file or directory: '/etc/apache2/libexec/apache2/mod_ssl.so'
Traceback (most recent call last):
File "/opt/homebrew/Cellar/certbot/1.32.0/libexec/lib/python3.11/site-packages/certbot_apache/_internal/configurator.py", line 297, in _open_module_file
with open(ssl_module_location, mode="rb") as f:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/etc/apache2/libexec/apache2/mod_ssl.so'
2022-11-16 15:59:52,369:WARNING:certbot_apache._internal.configurator:Unable to read ssl_module file; not disabling session tickets.
2022-11-16 15:59:52,369:DEBUG:certbot._internal.plugins.disco:No installation (PluginEntryPoint#nginx): Could not find a usable 'nginx' binary. Ensure nginx exists, the binary is executa$
Traceback (most recent call last):
File "/opt/homebrew/Cellar/certbot/1.32.0/libexec/lib/python3.11/site-packages/certbot/_internal/plugins/disco.py", line 160, in prepare
self._initialized.prepare()
File "/opt/homebrew/Cellar/certbot/1.32.0/libexec/lib/python3.11/site-packages/certbot_nginx/_internal/configurator.py", line 194, in prepare
raise errors.NoInstallationError(
certbot.errors.NoInstallationError: Could not find a usable 'nginx' binary. Ensure nginx exists, the binary is executable, and your PATH is set correctly.
2022-11-16 15:59:52,370:DEBUG:certbot._internal.plugins.selection:Single candidate plugin: * apache
Description: Apache Web Server plugin
Interfaces: Installer, Authenticator, Plugin
Entry point: apache = certbot_apache._internal.entrypoint:ENTRYPOINT
Initialized: <certbot_apache._internal.override_darwin.DarwinConfigurator object at 0x104c9cb50>
Prep: True
2022-11-16 15:59:52,371:DEBUG:certbot._internal.plugins.selection:Selected authenticator <certbot_apache._internal.override_darwin.DarwinConfigurator object at 0x104c9cb50> and installer$
2022-11-16 15:59:52,371:INFO:certbot._internal.plugins.selection:Plugins selected: Authenticator apache, Installer apache
2022-11-16 15:59:52,376:DEBUG:certbot._internal.main:Picked account: <Account(RegistrationResource(body=Registration(key=None, contact=(), agreement=None, status=None, terms_of_service_a$
2022-11-16 15:59:52,382:DEBUG:acme.client:Sending GET request to https://acme-v02.api.letsencrypt.org/directory.
2022-11-16 15:59:52,599:DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org:443
2022-11-16 15:59:52,783:DEBUG:urllib3.connectionpool:https://acme-v02.api.letsencrypt.org:443 "GET /directory HTTP/1.1" 200 659
2022-11-16 15:59:52,785:DEBUG:acme.client:Received response:
HTTP 200
Server: nginx
Date: Wed, 16 Nov 2022 23:59:52 GMT
Content-Type: application/json
Content-Length: 659
Connection: keep-alive
Cache-Control: public, max-age=0, no-cache
X-Frame-Options: DENY
Strict-Transport-Security: max-age=604800
Results of apachectl -S
*:80 is a NameVirtualHost
default server daserver.org (/private/etc/apache2/extra/httpd-vhosts.conf:28)
port 80 namevhost daserver.org (/private/etc/apache2/extra/httpd-vhosts.conf:28)
alias sf.daserver.org
alias carlisle.daserver.org
port 80 namevhost 15kv.com (/private/etc/apache2/extra/httpd-vhosts.conf:37)
alias www.15kv.com
port 80 namevhost patlacroix.com (/private/etc/apache2/extra/httpd-vhosts.conf:247)
alias www.patlacroix.com
port 80 namevhost pinkyweitzman.com (/private/etc/apache2/extra/httpd-vhosts.conf:262)
alias www.pinkyweitzman.com
port 80 namevhost plantsf.org (/private/etc/apache2/extra/httpd-vhosts.conf:273)
alias www.plantsf.org
alias plantsf.org
port 80 namevhost prichard.net (/private/etc/apache2/extra/httpd-vhosts.conf:288)
alias www.prichard.net
port 80 namevhost vmar.com (/private/etc/apache2/extra/httpd-vhosts.conf:328)
alias www.vmar.com
alias vmar.com
port 80 namevhost vmarmachine.shop (/private/etc/apache2/extra/httpd-vhosts.conf:361)
alias www.vmarmachine.shop
port 80 namevhost v-mar.com (/private/etc/apache2/extra/httpd-vhosts.conf:379)
port 80 namevhost wino.com (/private/etc/apache2/extra/httpd-vhosts.conf:410)
alias www.wino.com
port 80 namevhost wino.fm (/private/etc/apache2/extra/httpd-vhosts.conf:432)
alias www.wino.fm
port 80 namevhost www.v-mar.com (/private/etc/apache2/extra/httpd-vhosts.conf:473)
*:443 is a NameVirtualHost
default server wino.com (/private/etc/apache2/extra/httpd-vhosts-le-ssl.conf:2)
port 443 namevhost wino.com (/private/etc/apache2/extra/httpd-vhosts-le-ssl.conf:2)
alias www.wino.com
port 443 namevhost vmar.com (/private/etc/apache2/extra/httpd-vhosts-le-ssl.conf:26)
alias www.vmar.com
port 443 namevhost plantsf.org (/private/etc/apache2/extra/httpd-vhosts-le-ssl.conf:62)
alias www.plantsf.org
alias plantsf.org
port 443 namevhost org.org (/private/etc/apache2/extra/httpd-vhosts-le-ssl.conf:79)
alias www.org.org
port 443 namevhost v-mar.com (/private/etc/apache2/extra/httpd-vhosts-le-ssl.conf:96)
alias www.v-mar.com
port 443 namevhost patlacroix.com (/private/etc/apache2/extra/httpd-vhosts-le-ssl.conf:129)
alias www.patlacroix.com
ServerRoot: "/usr"
Main DocumentRoot: "/Volumes/storage/web"
Main ErrorLog: "/private/var/log/apache2/error_log"
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/private/var/run/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex cache-socache: using_defaults
Mutex watchdog-callback: using_defaults
PidFile: "/private/var/run/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="_www" id=70
Group: name="_www" id=70