Bug 43399 - Не работает с нашим Apache
Summary: Не работает с нашим Apache
Status: CLOSED WORKSFORME
Alias: None
Product: Sisyphus
Classification: Development
Component: certbot-apache (show other bugs)
Version: unstable
Hardware: x86 Linux
: P5 normal
Assignee: Vitaly Lipatov
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-29 15:30 MSK by Alexei V. Mezin
Modified: 2025-06-14 21:12 MSK (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexei V. Mezin 2022-07-29 15:30:02 MSK
# certbot --apache
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('Could not find configuration root')


Наше расположение /etc/httpd2, имена конфигрурационных файлов в нем, да и просто наличие apachectl вместо apache2ctl делают данный плагин неработоспособным абсолютно.
Comment 1 Yuri Krutov 2025-06-12 19:48:48 MSK
# certbot --apache
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')

Когда это исправят?

apache-base и certbot-apache стоят. p11 workstation.
Comment 2 Vitaly Lipatov 2025-06-13 19:42:51 MSK
Подскажите, неужели вы используете Apache прямо наружу, без nginx перед ним?
Comment 3 Yuri Krutov 2025-06-13 19:44:37 MSK
(Ответ для Vitaly Lipatov на комментарий #2)
> Подскажите, неужели вы используете Apache прямо наружу, без nginx перед ним?

да. nginx я не осилил.
Comment 4 Andrey Cherepanov 2025-06-13 21:17:56 MSK
(Ответ для jura12 на комментарий #1)
> # certbot --apache
> 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')
> 
> Когда это исправят?
> 
> apache-base и certbot-apache стоят. p11 workstation.

Никогда. Читайте http://altlinux.org/su-
Comment 5 Yuri Krutov 2025-06-13 22:09:15 MSK
(Ответ для Andrey Cherepanov на комментарий #4)
> (Ответ для jura12 на комментарий #1)
> > # certbot --apache
> > 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')
> > 
> > Когда это исправят?
> > 
> > apache-base и certbot-apache стоят. p11 workstation.
> 
> Никогда. Читайте http://altlinux.org/su-

я специально добавил в своем посте решетку перед certbot --apache . это означает что я уже в рут. но питон пути все равно не видит. толи он в контейнере, толи какиаято политики работает. 
вот полная последовательность действий:
$ su -
Password:
[root@host-94 ~]# echo $PATH
/root/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/game                                                                                                                                                     s
[root@host-94 ~]# apt-get install apache2 apache2-base
Чтение списков пакетов... Завершено
Построение дерева зависимостей... Завершено
Последняя версия apache2 уже установлена.
Последняя версия apache2-base уже установлена.
0 будет обновлено, 0 новых установлено, 0 пакетов будет удалено и 0 не будет обн                                                                                                                                                       овлено.
[root@host-94 ~]# apt-get install certbot certbot-apache
Чтение списков пакетов... Завершено
Построение дерева зависимостей... Завершено
Следующие НОВЫЕ пакеты будут установлены:
  certbot  certbot-apache
0 будет обновлено, 2 новых установлено, 0 пакетов будет удалено и 0 не будет обновлено.
Необходимо получить 0B/738kB архивов.
После распаковки потребуется дополнительно 3743kB дискового пространства.
Совершаем изменения...
Подготовка...                                                                                                               #################################################################################################### [100%]
Обновление / установка...
1: certbot-2.10.0-alt1                                                                                                      #################################################################################################### [ 50%]
2: certbot-apache-2.10.0-alt1                                                                                               #################################################################################################### [100%]
Завершено.
[root@host-94 ~]# certbot --apache -d jura12.ru
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')

также у вас не работает pip. 
# pip install certbot certbot-apache

Installing collected packages: cryptography, PyOpenSSL, josepy, acme, certbot, certbot-apache
  Attempting uninstall: cryptography
    Found existing installation: cryptography 42.0.5
ERROR: Cannot uninstall cryptography 42.0.5, RECORD file not found. You might be able to recover from this via: 'pip install --force-reinstall --no-deps cryptography==42.0.5'.

но это другая история.
ALT Workstation 11.0 (Prometheus)
Comment 6 Andrey Cherepanov 2025-06-13 22:37:43 MSK
Да, Вы правы. В Альте утилиты называются /usr/sbin/apachectl и /usr/sbin/apachectl2
Comment 7 Alexei V. Mezin 2025-06-13 22:57:59 MSK
(Ответ для Andrey Cherepanov на комментарий #6)
> Да, Вы правы. В Альте утилиты называются /usr/sbin/apachectl и
> /usr/sbin/apachectl2

О чем и было написано в первом сообщении три года назад. Видимо, надо просто убрать из репозитория пакет certbot-apache, если за три года никто даже не попытался его починить.
Comment 8 Yuri Krutov 2025-06-14 00:13:38 MSK
успешно получил сертификат и инсталлировал. последовательность команд:
ln -s /usr/sbin/apachectl /usr/sbin/apache2ctl
ln -s /etc/httpd2/conf/httpd2.conf /etc/httpd2/conf/apache2.conf
mkdir -p  /etc/httpd2/conf/conf-available
mkdir -p /etc/httpd2/conf/conf-enabled
apt-get install apache2-mod_ssl
a2enmod ssl
certbot --apache-server-root=/etc/httpd2/conf --apache -d jura12.ru
(a2ensite jura12.ru-le-ssl)
systemctl restart httpd2

для патча нудно включить в пакет команды:
ln -s /usr/sbin/apachectl /usr/sbin/apache2ctl
ln -s /etc/httpd2/conf/httpd2.conf /etc/httpd2/conf/apache2.conf
ln -s /etc/httpd2/conf /etc/apache2
apt-get install apache2-mod_ssl
Comment 9 Anton Farygin 2025-06-14 13:23:57 MSK
В certbot-apache надо просто поправить пути на наши и не придумывать симлинков.
Comment 10 Vitaly Lipatov 2025-06-14 21:12:44 MSK
(Ответ для Anton Farygin на комментарий #9)
> В certbot-apache надо просто поправить пути на наши и не придумывать
> симлинков.

Более того, там определяется дистрибутив и согласно этому вызываются команды. Debian/Fedora и т.п.
Comment 11 Vitaly Lipatov 2025-06-14 21:12:44 MSK
(Ответ для Anton Farygin на комментарий #9)
> В certbot-apache надо просто поправить пути на наши и не придумывать
> симлинков.

Более того, там определяется дистрибутив и согласно этому вызываются команды. Debian/Fedora и т.п.