Bug 29831 - certbot apache try to use wrong config directory /etc/httpd/conf.d by default
Summary: certbot apache try to use wrong config directory /etc/httpd/conf.d by default
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 8
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA8-64-OK
Keywords: advisory, validated_update
Depends on:
Blocks:
 
Reported: 2021-12-30 14:55 CET by Mika Laitio
Modified: 2022-01-05 23:46 CET (History)
4 users (show)

See Also:
Source RPM: certbot-apache-1.10.1-1.mga8.src.rpm
CVE:
Status comment:


Attachments

Description Mika Laitio 2021-12-30 14:55:58 CET
Description of problem:

certbot apache plugin fails to create the certificates with command:
  
   certbot --apache -d mydomain.com

because it tries to use wrong directory 
   /etc/httpd/conf.d
instead of 
   /etc/httpd/conf
that is used by apache on Mageia distribution. 

Workaround is to use instead the command
   certbot --apache --apache-challenge-location /etc/httpd/conf -d mydomain.com

Version-Release number of selected component (if applicable):

How reproducible:


Steps to Reproduce:
1. # urpmi apache certbot-apache
2. # certbot --apache -d mydomain.com 
   (replace mydomain.com with yout server's donain name)

Exact error:

Cleaning up challenges
File: /etc/httpd/conf.d/le_http_01_challenge_pre.conf - Could not be found to be deleted
 - Certbot probably shut down unexpectedly
File: /etc/httpd/conf.d/le_http_01_challenge_post.conf - Could not be found to be deleted
 - Certbot probably shut down unexpectedly
An unexpected error occurred:
FileNotFoundError: [Errno 2] No such file or directory: '/etc/httpd/conf.d/le_http_01_challenge_pre.conf'
Please see the logfiles in /var/log/letsencrypt for more details
Comment 1 Lewis Smith 2021-12-31 20:22:08 CET
Thank you for the report, diagnosis & (for others) the workaround.

kekepower is the current maintainer of this package, so assigning the bug to you.

Assignee: bugsquad => smelror

Comment 2 Stig-Ørjan Smelror 2022-01-01 21:02:13 CET
Advisory
========

certbot-apache tries to use the wrong directory.

References
==========


Files
=====

Uploaded to core/updates_testing

certbot-apache-1.10.1-1.1.mga8

from certbot-apache-1.10.1-1.1.mga8.src.rpm

Assignee: smelror => qa-bugs

Comment 3 Herman Viaene 2022-01-03 15:24:04 CET
MGA8-64 Plasma on Lenovo B50 in Dutch
No installation issues.
Taking inspiration from commands above and bug 22175 Comment 8
First 
# systemctl start httpd
then
# certbot --apache -d <mydummydomain>
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Enter email address (used for urgent renewal and security notices)
 (Enter 'c' to cancel): some
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server. Do you agree?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: y

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing, once your first certificate is successfully issued, to
share your email address with the Electronic Frontier Foundation, a founding
partner of the Let's Encrypt project and the non-profit organization that
develops Certbot? We'd like to send you email about our work encrypting the web,
EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: n
Account registered.
Requesting a certificate for <mydummydomain>
An unexpected error occurred:
The server will not issue certificates for the identifier :: Error creating new order :: Cannot issue for "hviaene.thuis": Domain name does not end with a valid public suffix (TLD)
Please see the logfiles in /var/log/letsencrypt for more details.

So the original error does not occur, and as in bug 22175 Comment 8, I would nt test on a real domain.

Whiteboard: (none) => MGA8-64-OK
CC: (none) => herman.viaene

Comment 4 Thomas Andrews 2022-01-04 19:14:47 CET
Validating. Advisory in Comment 2.

Keywords: (none) => validated_update
CC: (none) => andrewsfarm, sysadmin-bugs

Dave Hodgins 2022-01-05 19:33:22 CET

CC: (none) => davidwhodgins
Keywords: (none) => advisory

Comment 5 Mageia Robot 2022-01-05 23:46:27 CET
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2022-0001.html

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.