Certbot doesn't understand apache on FreeBSD

How the hell do i set this up in a way that it works bc i get this error message: FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/etc/apache24 /libexec/apache24/mod_ssl.so

I i know that i have that module enabled, but its just in .../libexec/apache24

Screenshot 2024-11-02 215426

Hello @dyo48, welcome to the Let's Encrypt community. :slightly_smiling_face:

This is not an Apache support forum.

Here details on Apache can be found in documentation and forums:

When you opened this thread in the Help section, you should have been provided with a questionnaire. Maybe you didn't get it somehow (which is weird), or you've decided to delete it. In any case, all the answers to this questionnaire are required:

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:

I ran this command:

It produced this output:

My web server is (include version):

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

My hosting provider, if applicable, is:

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

I'm using a control panel to manage my site (no, or provide the name and version of the control panel):

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):

Thank you for assisting us in helping YOU!

2 Likes

Sorry, now i see why my question is not clear. Certbot doesn't understand that my modules are stored in .../libexec/apache24 not in .../apache24/libexec and im asking how can i make it understand that

What version of Certbot?
And how did you install Certbot?

1 Like

Its py311 i think and i installed the apache version of that so pkt install py311-certbot-apache i belive.

This is the recommend way to install Certbot for Apache on FreeBSD

Edit and this is the present version Certbot 2.11.0 Release

2 Likes

It says that The most recent versions of packages are already installed so that couldn't be the problem could it? Or should i just reinstall altogether?

Please check your Certbot version with this command sudo certbot --version.

2 Likes

Its 2.11.0

1 Like

That's good.

2 Likes

Please also show the output of sudo apachectl -t -D DUMP_VHOSTS.

2 Likes

Screenshot 2024-11-02 222017

I am not an Apache person.
Kindly wait to see if there are more knowledgeable Let's Encrypt community volunteers willing to assist.

2 Likes

No problem man, im trying to solve this for the second day now, so i can wait another one. But i think it would be better if i renamed my problem, but its not possible now is it?

Yes, @dyo48, it is.

Click the pencil
image
out of this
image

2 Likes

Can you solve it by using symbolic links?
(I know it is kind of ugly)

2 Likes

Can i link a whole directory with its whole content to another this way? Bc if i can i don't really care if its ugly.

Here is some documentation (man pages)

2 Likes

You probably need to use one or both of these.

--apache-ctl APACHE_CTL
Full path to Apache control script (default: apache2ctl)
--apache-bin APACHE_BIN
Full path to apache2/httpd binary (default: None)

There may be others you'll need with a "non-standard" Apache install. User Guide — Certbot 2.12.0.dev0 documentation

That said, you will (likely) be better off using --webroot option rather than --apache plugin.

Using webroot means Certbot won't have to parse or control your Apache. It just places a token file in a spot you tell it. That should match the DocumentRoot of your VirtualHost. Use a --deploy-hook to gracefully reload Apache to pickup the new cert.

The main drawback to webroot is you will have to configure the HTTPS (port 443) VirtualHost yourself. But, Certbot just does that using the same guidelines as found here: https://ssl-config.mozilla.org/

I would not setup Stapling or HSTS until you know for sure what those do. HSTS in particular can cause trouble.

3 Likes