Cannot find Apache executable apachectl

result

[root@ediciones Descargas]# ./certbot-auto certonly -d ediciones.uis.edu.co
Saving debug log to /var/log/letsencrypt/letsencrypt.log

How would you like to authenticate with the ACME CA?


1: Spin up a temporary webserver (standalone)
2: Place files in webroot directory (webroot)


Select the appropriate number [1-2] then [enter] (press ‘c’ to cancel): 1
Plugins selected: Authenticator standalone, Installer None
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for ediciones.uis.edu.co
Cleaning up challenges
Problem binding to port 80: Could not bind to IPv4 or IPv6.

thenk you

If you use the standalone authenticator, first you must stop your normal webserver. So do that or use (2).

so do that or use (2) result:


Input the webroot for ediciones.uis.edu.co: (Enter ‘c’ to cancel): /opt/rh/httpd24/root/etc/httpd/conf
Waiting for verification…
Cleaning up challenges
Failed authorization procedure. ediciones.uis.edu.co (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://ediciones.uis.edu.co/.well-known/acme-challenge/H6Z6wBM3bv8fIJgKuZ99o8xRNKkzRr7Hy8i-msD9bOw: “\n\n404 Not Found\n\n

Not Found

\n<p”

IMPORTANT NOTES:

There may be a wrong redirect or your webroot - input is wrong. So, if /opt/rh/httpd24/root/etc/httpd/conf is your webroot, create two subdirectories

/opt/rh/httpd24/root/etc/httpd/conf/.well-known/acme-challenge/

there a file (file name 1234) and try to load this file via

http://ediciones.uis.edu.co/.well-known/acme-challenge/1234

to see if that works.

result:

[root@ediciones Descargas]# ./certbot-auto --apache --apache-ctl /opt/rh/httpd24/root/usr/sbin/apachectlwrapper
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 /opt/rh/httpd24/root/usr/sbin/apachectlwrapper’,)

Thank you

You need to use the entire command, not just the modified --apache-ctl param:

./certbot-auto --apache --apache-server-root /opt/rh/httpd24/root/etc/httpd --apache-vhost-root /opt/rh/httpd24/root/etc/httpd/conf.d
–apache-logs-root /opt/rh/httpd24/root/var/log/httpd --apache-challenge-location /opt/rh/httpd24/root/etc/httpd --apache-ctl /opt/rh/httpd24/root/usr/sbin/apachectlwrapper

hello,
use the command the result was:

Certbot can obtain and install HTTPS/TLS/SSL certificates. By default,
it will attempt to use a webserver both for obtaining and installing the
certificate.
certbot: error: unrecognized arguments: apache-logs-root /opt/rh/httpd24/root/var/log/httpd

The problem is a missing dash in the param apache-logs-root, here the right command:

./certbot-auto --apache --apache-server-root /opt/rh/httpd24/root/etc/httpd --apache-vhost-root /opt/rh/httpd24/root/etc/httpd/conf.d
--apache-logs-root /opt/rh/httpd24/root/var/log/httpd --apache-challenge-location /opt/rh/httpd24/root/etc/httpd --apache-ctl /opt/rh/httpd24/root/usr/sbin/apachectlwrapper

Use the command the result was:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Error while running /opt/rh/httpd24/root/usr/sbin/apachectl configtest.

httpd: Syntax error on line 56 of /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf: Syntax error on line 40 of /opt/rh/httpd24/root/etc/httpd/conf.modules.d/00-base.conf: Cannot load modules/mod_http2.so into server: libnghttp2-httpd24.so.14: cannot open shared object file: 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 /opt/rh/httpd24/root/usr/sbin/apachectl configtest.\n\nhttpd: Syntax error on line 56 of /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf: Syntax error on line 40 of /opt/rh/httpd24/root/etc/httpd/conf.modules.d/00-base.conf: Cannot load modules/mod_http2.so into server: libnghttp2-httpd24.so.14: cannot open shared object file: No such file or directory\n’,)

----------view letsencrypt/letsencrypt.log -----------

2018-10-05 08:37:58,507:DEBUG:certbot.main:certbot version: 0.27.1
2018-10-05 08:37:58,508:DEBUG:certbot.main:Arguments: [’–apache’, ‘–apache-server-root’, ‘/opt/rh/httpd24/root/etc/httpd’, ‘–apache-vhost-root’, ‘/opt/rh/httpd24/root/etc/httpd/conf.d’, ‘–apache-logs-root’, ‘/opt/rh/httpd24/root/var/log/httpd’, ‘–apache-challenge-location’, ‘/opt/rh/httpd24/root/etc/httpd’, ‘–apache-ctl’, ‘/opt/rh/httpd24/root/usr/sbin/apachectl’]
2018-10-05 08:37:58,508:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#apache,PluginEntryPoint#manual,PluginEntryPoint#nginx,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2018-10-05 08:37:58,533:DEBUG:certbot.log:Root logging level set at 20
2018-10-05 08:37:58,533:INFO:certbot.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log
2018-10-05 08:37:58,535:DEBUG:certbot.plugins.selection:Requested authenticator apache and installer apache
2018-10-05 08:37:58,654:ERROR:certbot.util:Error while running /opt/rh/httpd24/root/usr/sbin/apachectl configtest.

httpd: Syntax error on line 56 of /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf: Syntax error on line 40 of /opt/rh/httpd24/root/etc/httpd/conf.modules.d/00-base.conf: Cannot load modules/mod_http2.so into server: libnghttp2-httpd24.so.14: cannot open shared object file: No such file or directory

2018-10-05 08:37:58,655:DEBUG:certbot.plugins.disco:Misconfigured PluginEntryPoint#apache: Error while running /opt/rh/httpd24/root/usr/sbin/apachectl configtest.

httpd: Syntax error on line 56 of /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf: Syntax error on line 40 of /opt/rh/httpd24/root/etc/httpd/conf.modules.d/00-base.conf: Cannot load modules/mod_http2.so into server: libnghttp2-httpd24.so.14: cannot open shared object file: No such file or directory
Traceback (most recent call last):
File “/opt/eff.org/certbot/venv/lib/python2.7/site-packages/certbot/plugins/disco.py”, line 132, in prepare
self._initialized.prepare()
File “/opt/eff.org/certbot/venv/lib/python2.7/site-packages/certbot_apache/configurator.py”, line 235, in prepare
self.config_test()
File “/opt/eff.org/certbot/venv/lib/python2.7/site-packages/certbot_apache/configurator.py”, line 2213, in config_test
raise errors.MisconfigurationError(str(err))
MisconfigurationError: Error while running /opt/rh/httpd24/root/usr/sbin/apachectl configtest.

httpd: Syntax error on line 56 of /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf: Syntax error on line 40 of /opt/rh/httpd24/root/etc/httpd/conf.modules.d/00-base.conf: Cannot load modules/mod_http2.so into server: libnghttp2-httpd24.so.14: cannot open shared object file: No such file or directory

2018-10-05 08:37:58,657:DEBUG:certbot.plugins.selection:Single candidate plugin: * apache
Description: Apache Web Server plugin - Beta
Interfaces: IAuthenticator, IInstaller, IPlugin
Entry point: apache = certbot_apache.entrypoint:ENTRYPOINT
Initialized: <certbot_apache.override_centos.CentOSConfigurator object at 0x7ff3c76e0610>
Prep: Error while running /opt/rh/httpd24/root/usr/sbin/apachectl configtest.

httpd: Syntax error on line 56 of /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf: Syntax error on line 40 of /opt/rh/httpd24/root/etc/httpd/conf.modules.d/00-base.conf: Cannot load modules/mod_http2.so into server: libnghttp2-httpd24.so.14: cannot open shared object file: No such file or directory

2018-10-05 08:37:58,658:DEBUG:certbot.plugins.selection:Selected authenticator None and installer None

Are you sure you are using the last command I posted above? Because seems like it is using /opt/rh/httpd24/root/usr/sbin/apachectl instead of /opt/rh/httpd24/root/usr/sbin/apachectlwrapper

What's the content of 00-base.conf line 40?

Please deactivate your http2 - directive.

@JuergenAuer, seems there is a bug in the apache version used by @jadel so the command apachectl doesn’t work and it needs to be executed using scl but there is nothing wrong with the conf (apparently).

1 Like

I am use the last comand, result:

[root@ediciones Descargas]# ./certbot-auto --apache --apache-server-root /opt/rh/httpd24/root/etc/httpd --apache-vhost-root /opt/rh/httpd24/root/etc/httpd/conf.d --apache-logs-root /opt/rh/httpd24/root/var/log/httpd --apache-challenge-location /opt/rh/httpd24/root/etc/httpd --apache-ctl /opt/rh/httpd24/root/usr/sbin/apachectlwrapper
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 /opt/rh/httpd24/root/usr/sbin/apachectlwrapper’,)

37 LoadModule ext_filter_module modules/mod_ext_filter.so
38 LoadModule filter_module modules/mod_filter.so
39 LoadModule headers_module modules/mod_headers.so
40 LoadModule http2_module modules/mod_http2.so
41 LoadModule include_module modules/mod_include.so
42 LoadModule info_module modules/mod_info.so
43 LoadModule log_config_module modules/mod_log_config.so

There you see the line you should deactivate.

Muchas gracias a todos, con su ayuda he instalado certbot en httpd24

Fin del caso.

2 Likes

Happy to read that, https://ediciones.uis.edu.co/ has now a Letsencrypt certificate created today. :wink:

What was the solution?

Primero:

echo -e '#!/bin/bash\nscl enable httpd24 -- /opt/rh/httpd24/root/usr/sbin/apachectl $@' > /opt/rh/httpd24/root/usr/sbin/apachectlwrapper

Segundo:

chmod 750 /opt/rh/httpd24/root/usr/sbin/apachectlwrapper

Y después:

./certbot-auto --apache --apache-server-root /opt/rh/httpd24/root/etc/httpd --apache-vhost-root /opt/rh/httpd24/root/etc/httpd/conf.d
--apache-logs-root /opt/rh/httpd24/root/var/log/httpd --apache-challenge-location /opt/rh/httpd24/root/etc/httpd --apache-ctl /opt/rh/httpd24/root/usr/sbin/apachectlwrapper
2 Likes

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