I,m running different domain on an Apache server with vhost
So I tried to set cert with certbot following digitalocean tuto
But when I run
root@vdsxxx:~# certbot-auto --apache -d mydomain.com -d www.mydomain.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Failed to find apache2ctl in PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/mysql/bin/
The apache plugin is not working; there may be problems with your existing configuration.
The error was: NoInstallationError(âCannot find Apache control command apache2ctlâ,)
The problem is the fact apache have been compiled and not install by apt
When I check https://github.com/certbot/certbot/blob/master/certbot-apache/certbot_apache/constants.py
i my case almost everything are different:
server_root="/ur/local/apache2",
vhost_root="/ur/local/apache2/sitessup",
vhost_files="*",
logs_root="/var/log/apache2",
version_cmd=[âhttpdâ, â-vâ],
define_cmd=[âhttpdâ, â-tâ, â-Dâ, âDUMP_RUN_CFGâ],
restart_cmd=[âhttpdâ, âgracefulâ],
conftest_cmd=[âhttpdâ, âconfigtestâ],
enmod=?,
dismod=?,
le_vhost_ext=?,
handle_mods=?,
handle_sites=?,
challenge_location=?,
MOD_SSL_CONF_SRC=?
How could I install set up cert?
Config ;
Linux vds143 3.13.0-100-generic #147-Ubuntu SMP Tue Oct 18 16:48:51 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
root@vds143:~# /usr/local/apache2/bin/httpd -V
Server version: Apache/2.2.31 (Unix)
Server built: May 27 2016 03:13:57
Server's Module Magic Number: 20051115:40
Server loaded: APR 1.5.2, APR-Util 1.5.4
Compiled using: APR 1.5.2, APR-Util 1.5.4
Architecture: 64-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT="/usr/local/apache2"
-D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="logs/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"