Unable to find vhost on port 80

If certbot can't find the port 80 vHost to acquire the cert, but can find it to install the cert, I think I might laugh myself into a hysterical coma. :crazy_face:

I honestly hope it works though. It would give me something funny to discuss with Brad. :grin:

1 Like

Still isn't really reading the virtual hosts properly, it happens for both installs, is this because of the Alias tag not being a server name?

macminiserver@Mini ~ % sudo certbot --apache --reinstall -d "towingswanhill.com,www.towingswanhill.com"
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Could not find ssl_module; not disabling session tickets.
Requesting a certificate for towingswanhill.com and www.towingswanhill.com

Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/towingswanhill.com-0001/fullchain.pem
Key is saved at: /etc/letsencrypt/live/towingswanhill.com-0001/privkey.pem
This certificate expires on 2021-09-26.
These files will be updated when the certificate renews.

Deploying certificate
Could not install certificate

NEXT STEPS:

  • The certificate was saved, but could not be installed (installer: apache). After fixing the error shown below, try installing it again by running:
    certbot install --cert-name towingswanhill.com-0001
  • The certificate will need to be renewed before it expires. Certbot can automatically renew the certificate in the background, but you may need to take steps to enable that functionality. See User Guide — Certbot 2.7.0.dev0 documentation for instructions.

Certbot could not find a VirtualHost for towingswanhill.com in the Apache configuration. Please create a VirtualHost with a ServerName matching towingswanhill.com and try again.

1 Like

[I really did expect that to fail; but I've not yet given up on that installation path]

1 Like

And since the cert name shown includes "-0001", please re-show the latest output of:
certbot certificates

1 Like

VirtualHost configuration:
*:80 is a NameVirtualHost
default server rosslocalmowing.com (/private/etc/apache2/extra/httpd-vhosts.conf:41)
port 80 namevhost rosslocalmowing.com (/private/etc/apache2/extra/httpd-vhosts.conf:41)
alias www.rosslocalmowing.com
port 80 namevhost towingswanhill.com (/private/etc/apache2/extra/httpd-vhosts.conf:52)
alias www.towingswanhill.com
port 80 namevhost lns-myadminphp.com (/private/etc/apache2/extra/httpd-vhosts.conf:63)
alias www.lns-myadminphp.com
ServerRoot: "/usr"
Main DocumentRoot: "/Library/WebServer/Documents"
Main ErrorLog: "/private/var/log/apache2/error_log"
Mutex default: dir="/private/var/run/" mechanism=default
Mutex mpm-accept: using_defaults
PidFile: "/private/var/run/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="_www" id=70 not_used
Group: name="_www" id=70 not_used


Found the following certs:
Certificate Name: rosslocalmowing.com
Serial Number: 38df7ba2ffba1560d81d0749c193051caba
Key Type: RSA
Domains: rosslocalmowing.com www.rosslocalmowing.com
Expiry Date: 2021-09-26 06:51:40+00:00 (VALID: 89 days)
Certificate Path: /etc/letsencrypt/live/rosslocalmowing.com/fullchain.pem
Private Key Path: /etc/letsencrypt/live/rosslocalmowing.com/privkey.pem
Certificate Name: towingswanhill.com-0001
Serial Number: 3279d949556fb1a93b7769f71d252047996
Key Type: RSA
Domains: towingswanhill.com www.towingswanhill.com
Expiry Date: 2021-09-26 06:55:04+00:00 (VALID: 89 days)
Certificate Path: /etc/letsencrypt/live/towingswanhill.com-0001/fullchain.pem
Private Key Path: /etc/letsencrypt/live/towingswanhill.com-0001/privkey.pem
Certificate Name: towingswanhill.com
Serial Number: 459c7e8e90cf7a139bdc40153dd2015f28b
Key Type: RSA
Domains: towingswanhill.com rosslocalmowing.com www.rosslocalmowing.com www.towingswanhill.com
Expiry Date: 2021-09-26 06:20:43+00:00 (VALID: 89 days)
Certificate Path: /etc/letsencrypt/live/towingswanhill.com/fullchain.pem
Private Key Path: /etc/letsencrypt/live/towingswanhill.com/privkey.pem


1 Like

Please delete these two certs:
certbot delete --cert-name rosslocalmowing.com
certbot delete --cert-name towingswanhill.com-0001

and then re-show:
certbot certificates

1 Like

This is interesting...:

1 Like

What say:
which apache2
find / -name apache2
find / -name apache2.conf
find / -name httpd.conf

1 Like

Also try with only specifying the Apache server root:

sudo certbot install \
--cert-name towingswanhill.com \
--apache-server-root /private/etc/apache2

[I guess it's good night for now]

1 Like

I'm not sure what the good outcome of this is, but it doesn't seem like it returned anything useful. There is however a folder located private/etc/apache2, but I don't spot the config file yet

1 Like

Please respond to my posts.

2 Likes

seems to be the same result, unless I have entered it wrong?

macminiserver@Mini ~ % sudo certbot install --cert-name towingswanhill.com --apache-server-root /private/etc/apache2
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Could not find ssl_module; not disabling session tickets.
Deploying certificate
Could not install certificate
Certbot could not find a VirtualHost for towingswanhill.com in the Apache configuration. Please create a VirtualHost with a ServerName matching towingswanhill.com and try again.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

1 Like
1 Like

find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000z000007r/0/dmd: Operation not permitted
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000z000007r/0/com.apple.nsurlsessiond: Operation not permitted
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000z000007r/0/com.apple.routined/dv: Operation not permitted
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/0/com.apple.LaunchServices.dv: Operation not permitted
find: /private/var/protected/trustd/private: Operation not permitted
/Users/Shared/Previously Relocated Items 1/Configuration/private/etc/apache2
/Users/Shared/Relocated Items/Configuration/private/etc/apache2
/Users/Shared/Previously Relocated Items/Configuration/private/etc/apache2
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/apache2
/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/www/apache2
find: /dev/fd/3: Not a directory
find: /dev/fd/4: Not a directory
find: /dev/fd/6: Not a directory

macminiserver@Mini ~ % sudo certbot delete --cert-name rosslocalmowing.com
Password:
Saving debug log to /var/log/letsencrypt/letsencrypt.log


The following certificate(s) are selected for deletion:

Are you sure you want to delete the above certificate(s)?


(Y)es/(N)o: Y
No certificate found with name rosslocalmowing.com (expected /etc/letsencrypt/renewal/rosslocalmowing.com.conf).
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

macminiserver@Mini ~ % sudo certbot delete --cert-name towingswanhill.com-0001
Saving debug log to /var/log/letsencrypt/letsencrypt.log


The following certificate(s) are selected for deletion:

  • towingswanhill.com-0001

Are you sure you want to delete the above certificate(s)?


(Y)es/(N)o: Y
No certificate found with name towingswanhill.com-0001 (expected /etc/letsencrypt/renewal/towingswanhill.com-0001.conf).
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

macminiserver@Mini ~ % sudo certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log


Found the following certs:
Certificate Name: towingswanhill.com
Serial Number: 459c7e8e90cf7a139bdc40153dd2015f28b
Key Type: RSA
Domains: towingswanhill.com rosslocalmowing.com www.rosslocalmowing.com www.towingswanhill.com
Expiry Date: 2021-09-26 06:20:43+00:00 (VALID: 89 days)
Certificate Path: /etc/letsencrypt/live/towingswanhill.com/fullchain.pem
Private Key Path: /etc/letsencrypt/live/towingswanhill.com/privkey.pem


1 Like

Also thanks so much so far for all the help. This is honestly a struggle for me and having someone so helping is really awesome to help me get this done.

2 Likes

Try those with sudo.
Like:
sudo find / -name apache2

2 Likes

Sorry the post is a bit long but here is the result

macminiserver@Mini ~ % sudo find / -name apache2
/usr/libexec/apache2
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Aliases/apache2
/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include/apache2
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/apache2
find: /Library/Caches/com.apple.aned: Operation not permitted
/System/Library/Templates/Data/private/etc/apache2
find: /System/Library/Templates/Data/private/var/db/oah: Operation not permitted
/System/Library/Templates/Data/private/var/log/apache2
/System/Volumes/Data/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Aliases/apache2
find: /System/Volumes/Data/.Spotlight-V100: No such file or directory
find: /System/Volumes/Data/boot: No such file or directory
/System/Volumes/Data/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include/apache2
/System/Volumes/Data/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/apache2
find: /System/Volumes/Data/Library/Caches/com.apple.aned: Operation not permitted
/System/Volumes/Data/System/Library/Templates/Data/private/etc/apache2
find: /System/Volumes/Data/System/Library/Templates/Data/private/var/db/oah: Operation not permitted
/System/Volumes/Data/System/Library/Templates/Data/private/var/log/apache2
find: /System/Volumes/Data/mnt: No such file or directory
find: /System/Volumes/Data/.fseventsd: No such file or directory
/System/Volumes/Data/private/etc/apache2
find: /System/Volumes/Data/private/var/networkd/db: Operation not permitted
find: /System/Volumes/Data/private/var/db/appinstalld: Operation not permitted
find: /System/Volumes/Data/private/var/db/fpsd/dvp: Operation not permitted
find: /System/Volumes/Data/private/var/db/installcoordinationd: Operation not permitted
find: /System/Volumes/Data/private/var/db/oah: Operation not permitted
find: /System/Volumes/Data/private/var/db/lockdown: Operation not permitted
find: /System/Volumes/Data/private/var/db/DifferentialPrivacy: Operation not permitted
find: /System/Volumes/Data/private/var/db/MobileIdentityService: Operation not permitted
find: /System/Volumes/Data/private/var/db/searchparty: Operation not permitted
find: /System/Volumes/Data/private/var/db/CoreDuet/Knowledge: Operation not permitted
find: /System/Volumes/Data/private/var/db/ConfigurationProfiles/Store: Operation not permitted
/System/Volumes/Data/private/var/log/apache2
find: /System/Volumes/Data/private/var/folders/cn/kfx5ntr16xjc857wjt85fr2c0000gl/0/com.apple.ScreenTimeAgent/Store: Operation not permitted
find: /System/Volumes/Data/private/var/folders/cn/kfx5ntr16xjc857wjt85fr2c0000gl/0/com.apple.lockoutagent: Operation not permitted
find: /System/Volumes/Data/private/var/folders/cn/kfx5ntr16xjc857wjt85fr2c0000gl/0/com.apple.progressd/ClassKit: Operation not permitted
find: /System/Volumes/Data/private/var/folders/cn/kfx5ntr16xjc857wjt85fr2c0000gl/0/com.apple.LaunchServices.dv: Operation not permitted
find: /System/Volumes/Data/private/var/folders/cn/kfx5ntr16xjc857wjt85fr2c0000gl/0/dmd: Operation not permitted
find: /System/Volumes/Data/private/var/folders/cn/kfx5ntr16xjc857wjt85fr2c0000gl/0/com.apple.nsurlsessiond/com.apple.nsurlsessiond: Operation not permitted
find: /System/Volumes/Data/private/var/folders/cn/kfx5ntr16xjc857wjt85fr2c0000gl/0/com.apple.SharedWebCredentials: Operation not permitted
find: /System/Volumes/Data/private/var/folders/cn/kfx5ntr16xjc857wjt85fr2c0000gl/0/com.apple.routined/dv: Operation not permitted
find: /System/Volumes/Data/private/var/folders/cn/kfx5ntr16xjc857wjt85fr2c0000gl/C/com.apple.QuickLook.thumbnailcache: Operation not permitted
find: /System/Volumes/Data/private/var/folders/t5/6pgx_mqx23bg6gh8fm40160w0000gn/0/com.apple.ScreenTimeAgent/Store: Operation not permitted
find: /System/Volumes/Data/private/var/folders/t5/6pgx_mqx23bg6gh8fm40160w0000gn/0/com.apple.lockoutagent: Operation not permitted
find: /System/Volumes/Data/private/var/folders/t5/6pgx_mqx23bg6gh8fm40160w0000gn/0/com.apple.progressd/ClassKit: Operation not permitted
find: /System/Volumes/Data/private/var/folders/t5/6pgx_mqx23bg6gh8fm40160w0000gn/0/com.apple.Safari/SafariFamily: Operation not permitted
find: /System/Volumes/Data/private/var/folders/t5/6pgx_mqx23bg6gh8fm40160w0000gn/0/com.apple.LaunchServices.dv: Operation not permitted
find: /System/Volumes/Data/private/var/folders/t5/6pgx_mqx23bg6gh8fm40160w0000gn/0/dmd: Operation not permitted
find: /System/Volumes/Data/private/var/folders/t5/6pgx_mqx23bg6gh8fm40160w0000gn/0/com.apple.nsurlsessiond: Operation not permitted
find: /System/Volumes/Data/private/var/folders/t5/6pgx_mqx23bg6gh8fm40160w0000gn/0/com.apple.SharedWebCredentials: Operation not permitted
find: /System/Volumes/Data/private/var/folders/t5/6pgx_mqx23bg6gh8fm40160w0000gn/0/com.apple.routined/dv: Operation not permitted
find: /System/Volumes/Data/private/var/folders/t5/6pgx_mqx23bg6gh8fm40160w0000gn/C/com.apple.WebKit.WebContent.Sandbox: Operation not permitted
find: /System/Volumes/Data/private/var/folders/t5/6pgx_mqx23bg6gh8fm40160w0000gn/C/com.apple.QuickLook.thumbnailcache: Operation not permitted
find: /System/Volumes/Data/private/var/folders/t5/6pgx_mqx23bg6gh8fm40160w0000gn/C/com.apple.WebKit.Networking.Sandbox: Operation not permitted
find: /System/Volumes/Data/private/var/folders/t5/6pgx_mqx23bg6gh8fm40160w0000gn/C/com.apple.quicklook.ThumbnailsAgent/com.apple.QuickLook.thumbnailcache: Operation not permitted
find: /System/Volumes/Data/private/var/folders/zz/zyxvpxvq6csfxvn_n00000sm00006d/0: Operation not permitted
find: /System/Volumes/Data/private/var/folders/zz/zyxvpxvq6csfxvn_n00000sm00006d/C: Operation not permitted
find: /System/Volumes/Data/private/var/folders/zz/zyxvpxvq6csfxvn_n00000y800007k/0/com.apple.nsurlsessiond: Operation not permitted
find: /System/Volumes/Data/private/var/folders/zz/zyxvpxvq6csfxvn_n00000z000007r/0/com.apple.ScreenTimeAgent/Store: Operation not permitted
find: /System/Volumes/Data/private/var/folders/zz/zyxvpxvq6csfxvn_n00000z000007r/0/com.apple.lockoutagent: Operation not permitted
find: /System/Volumes/Data/private/var/folders/zz/zyxvpxvq6csfxvn_n00000z000007r/0/dmd: Operation not permitted
find: /System/Volumes/Data/private/var/folders/zz/zyxvpxvq6csfxvn_n00000z000007r/0/com.apple.nsurlsessiond: Operation not permitted
find: /System/Volumes/Data/private/var/folders/zz/zyxvpxvq6csfxvn_n00000z000007r/0/com.apple.routined/dv: Operation not permitted
find: /System/Volumes/Data/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/0/com.apple.LaunchServices.dv: Operation not permitted
find: /System/Volumes/Data/private/var/protected/trustd/private: Operation not permitted
find: /System/Volumes/Data/.DocumentRevisions-V100: No such file or directory
/System/Volumes/Data/Users/Shared/Previously Relocated Items 1/Configuration/private/etc/apache2
/System/Volumes/Data/Users/Shared/Relocated Items/Configuration/private/etc/apache2
/System/Volumes/Data/Users/Shared/Previously Relocated Items/Configuration/private/etc/apache2
/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/apache2
/System/Volumes/Data/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/www/apache2
find: /System/Volumes/Data/.PreviousSystemInformation: No such file or directory
find: /System/Volumes/Data/.TemporaryItems: No such file or directory
find: /System/Volumes/iSCPreboot: No such file or directory
find: /System/DriverKit: No such file or directory
/private/etc/apache2
find: /private/var/networkd/db: Operation not permitted
find: /private/var/db/appinstalld: Operation not permitted
find: /private/var/db/fpsd/dvp: Operation not permitted
find: /private/var/db/installcoordinationd: Operation not permitted
find: /private/var/db/oah: Operation not permitted
find: /private/var/db/lockdown: Operation not permitted
find: /private/var/db/DifferentialPrivacy: Operation not permitted
find: /private/var/db/MobileIdentityService: Operation not permitted
find: /private/var/db/searchparty: Operation not permitted
find: /private/var/db/CoreDuet/Knowledge: Operation not permitted
find: /private/var/db/ConfigurationProfiles/Store: Operation not permitted
/private/var/log/apache2
find: /private/var/folders/cn/kfx5ntr16xjc857wjt85fr2c0000gl/0/com.apple.ScreenTimeAgent/Store: Operation not permitted
find: /private/var/folders/cn/kfx5ntr16xjc857wjt85fr2c0000gl/0/com.apple.lockoutagent: Operation not permitted
find: /private/var/folders/cn/kfx5ntr16xjc857wjt85fr2c0000gl/0/com.apple.progressd/ClassKit: Operation not permitted
find: /private/var/folders/cn/kfx5ntr16xjc857wjt85fr2c0000gl/0/com.apple.LaunchServices.dv: Operation not permitted
find: /private/var/folders/cn/kfx5ntr16xjc857wjt85fr2c0000gl/0/dmd: Operation not permitted
find: /private/var/folders/cn/kfx5ntr16xjc857wjt85fr2c0000gl/0/com.apple.nsurlsessiond/com.apple.nsurlsessiond: Operation not permitted
find: /private/var/folders/cn/kfx5ntr16xjc857wjt85fr2c0000gl/0/com.apple.SharedWebCredentials: Operation not permitted
find: /private/var/folders/cn/kfx5ntr16xjc857wjt85fr2c0000gl/0/com.apple.routined/dv: Operation not permitted
find: /private/var/folders/cn/kfx5ntr16xjc857wjt85fr2c0000gl/C/com.apple.QuickLook.thumbnailcache: Operation not permitted
find: /private/var/folders/t5/6pgx_mqx23bg6gh8fm40160w0000gn/0/com.apple.ScreenTimeAgent/Store: Operation not permitted
find: /private/var/folders/t5/6pgx_mqx23bg6gh8fm40160w0000gn/0/com.apple.lockoutagent: Operation not permitted
find: /private/var/folders/t5/6pgx_mqx23bg6gh8fm40160w0000gn/0/com.apple.progressd/ClassKit: Operation not permitted
find: /private/var/folders/t5/6pgx_mqx23bg6gh8fm40160w0000gn/0/com.apple.Safari/SafariFamily: Operation not permitted
find: /private/var/folders/t5/6pgx_mqx23bg6gh8fm40160w0000gn/0/com.apple.LaunchServices.dv: Operation not permitted
find: /private/var/folders/t5/6pgx_mqx23bg6gh8fm40160w0000gn/0/dmd: Operation not permitted
find: /private/var/folders/t5/6pgx_mqx23bg6gh8fm40160w0000gn/0/com.apple.nsurlsessiond: Operation not permitted
find: /private/var/folders/t5/6pgx_mqx23bg6gh8fm40160w0000gn/0/com.apple.SharedWebCredentials: Operation not permitted
find: /private/var/folders/t5/6pgx_mqx23bg6gh8fm40160w0000gn/0/com.apple.routined/dv: Operation not permitted
find: /private/var/folders/t5/6pgx_mqx23bg6gh8fm40160w0000gn/C/com.apple.WebKit.WebContent.Sandbox: Operation not permitted
find: /private/var/folders/t5/6pgx_mqx23bg6gh8fm40160w0000gn/C/com.apple.QuickLook.thumbnailcache: Operation not permitted
find: /private/var/folders/t5/6pgx_mqx23bg6gh8fm40160w0000gn/C/com.apple.WebKit.Networking.Sandbox: Operation not permitted
find: /private/var/folders/t5/6pgx_mqx23bg6gh8fm40160w0000gn/C/com.apple.quicklook.ThumbnailsAgent/com.apple.QuickLook.thumbnailcache: Operation not permitted
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000sm00006d/0: Operation not permitted
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000sm00006d/C: Operation not permitted
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000y800007k/0/com.apple.nsurlsessiond: Operation not permitted
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000z000007r/0/com.apple.ScreenTimeAgent/Store: Operation not permitted
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000z000007r/0/com.apple.lockoutagent: Operation not permitted
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000z000007r/0/dmd: Operation not permitted
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000z000007r/0/com.apple.nsurlsessiond: Operation not permitted
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000z000007r/0/com.apple.routined/dv: Operation not permitted
find: /private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/0/com.apple.LaunchServices.dv: Operation not permitted
find: /private/var/protected/trustd/private: Operation not permitted
/Users/Shared/Previously Relocated Items 1/Configuration/private/etc/apache2
/Users/Shared/Relocated Items/Configuration/private/etc/apache2
/Users/Shared/Previously Relocated Items/Configuration/private/etc/apache2
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/apache2
/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/www/apache2
find: /dev/fd/3: Not a directory
find: /dev/fd/4: Not a directory
find: /dev/fd/6: Not a directory
1 Like

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