Fail to Run Certbot on Apache

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. |, 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: sudo certbot --apache

It produced this output: Saving debug log to /var/log/letsencrypt/letsencrypt.log

The apache plugin is not working; there may be problems with your existing configuration.

The error was: NoInstallationError('Cannot find Apache executable apache2ctl')

My web server is (include version): Apache/2.4.48 (Unix)

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

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
DirectAdmin (from post #4)

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

1 Like

Hi @likeasong, welcome to the LE community forum :slight_smile:

I second that guess.
Let's try to unravel this problem with the output of:
sudo apachectl -t -D DUMP_VHOSTS

1 Like

Thank you for the welcome! Here is the output:

VirtualHost configuration: is a NameVirtualHost
default server localhost (/etc/httpd/conf/extra/httpd-vhosts.conf:31)
port 80 namevhost localhost (/etc/httpd/conf/extra/httpd-vhosts.conf:31)
port 80 namevhost (/usr/local/directadmin/data/users/admin/httpd.conf:20)
alias is a NameVirtualHost
default server localhost (/etc/httpd/conf/extra/httpd-vhosts.conf:46)
port 443 namevhost localhost (/etc/httpd/conf/extra/httpd-vhosts.conf:46)
port 443 namevhost (/usr/local/directadmin/data/users/admin/httpd.conf:44)
*:443 (/etc/httpd/conf/extra/httpd-ssl.conf:81)


By the way, I forgot to mention that I use DirectAdmin.

1 Like

Does it have a menu option for SSL?

Either way, we should probably have a look at this file:


Hi rg305, thank you for the reminder of checking DirectAdmin. So it does have an option to set the site to be secure SSL and I checked my website's certificate - it's from Let's Encrypt.

I would like to thank you for your very quick response. I am very new to web hosting and all, and getting help in time makes me so relieved.


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