Apache configtest file path

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

I ran this command:
sudo /opt/homebrew/bin/certbot ccertonly --cert-name envirotemps.com --apache
-w /Users/lowerlevel/Sites/envirotemps -d "envirotemps.com,www.envirotemps.com"
-w /Users/lowerlevel/Sites/hi-tech -d "hi-tech.rent,www.hi-tech.rent"
-w /Users/lowerlevel/Sites/Hi-TechRent -d "Hi-TechRent.com,www.Hi-TechRent.com"
-w /Users/lowerlevel/Sites/CleanAirWikiCom -d "AimHighSchools.com,www.AimHighSchools.com"
-w /Users/lowerlevel/Sites/CleanAirWikiNet -d "AimHighSchools.net,www.AimHighSchools.net" --dry-run

It produced this output:Error while running apachectl configtest.

httpd: Could not open configuration file /opt/homebrew/etc/httpd/httpd.conf: No such file or directory

The apache plugin is not working; there may be problems with your existing configuration.
The error was: MisconfigurationError('Error while running apachectl configtest.\n\nhttpd: Could not open configuration file /opt/homebrew/etc/httpd/httpd.conf: No such file or directory\n')

My web server is (include version):Apache 2.4.66

The operating system my web server runs on is (include version):
MacOS Sequoia 15.7.4
My hosting provider, if applicable, is: my company

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): 5.2.2 Installed by brew

Last year I had hackers with no IP addresses on my servers before the scheduled renewal date so I shut them both down until I had time to work on it. I have split my 18 domains to run on 2 Mac servers. This is the development server thus the name walkershire.net is now on the other server.

Have to leave now for theater and dinner. Will be back after dinner.

Have you always used the --apache option?

Because you also give a -w (--webroot-path) which is only used with --webroot, not --apache.

What happens if you try it with --webroot instead of --apache
(and correct spelling of ccertonly)

sudo /opt/homebrew/bin/certbot certonly --cert-name envirotemps.com --webroot -w /Users/lowerlevel/Sites/envirotemps -d ...(the rest)... --dry-run

4 Likes

certonly was spelled correctly on terminal of remote computer. Maybe TeamViewer changed it when I copied and pasted.

And what about this question?

1 Like

I used the your suggestion with --webroot -w above but certainly did not like the -w so I deleted it and got:
Input the webroot for envirotemps.com:

I this where the certs will be placed which I think should be /opt/homebrew/etc/certbot/certs
or is it
/opt/homebrew/var/www

Blockquote

I used the later and got:
/opt/homebrew/var/www does not exist or is not a directory


Input the webroot for envirotemps.com: (Enter 'c' to cancel):

What is the DocumentRoot directory in the Apache VirtualHost for that domain?

1 Like

I fixed it. I had the the Site folder instead of www in the list of domains.

Thank You for your. help.

1 Like