My domain is: sesstim4.timone.univ-amu.fr
I ran this command: sudo certbot -v --apache
It produced this output:
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): jean-charles.dufour@univ-amu.fr
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.3-September-21-2022.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: Y
Account registered.
Which names would you like to activate HTTPS for?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: sesstim4.timone.univ-amu.fr
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel):
Requesting a certificate for sesstim4.timone.univ-amu.fr
Performing the following challenges:
http-01 challenge for sesstim4.timone.univ-amu.fr
Waiting for verification...
Challenge failed for domain sesstim4.timone.univ-amu.fr
http-01 challenge for sesstim4.timone.univ-amu.fr
Certbot failed to authenticate some domains (authenticator: apache). The Certificate Authority reported these problems:
Domain: sesstim4.timone.univ-amu.fr
Type: connection
Detail: 139.124.158.220: Fetching http://sesstim4.timone.univ-amu.fr/.well-known/acme-challenge/IsMkt-drXl9s1dch_25Ca6ESRQJEtOHiCu2wgv4gscI: Connection reset by peer
Hint: The Certificate Authority failed to verify the temporary Apache configuration changes made by Certbot. Ensure that the listed domains point to this Apache server and that it is accessible from the internet.
Cleaning up challenges
Some challenges have failed.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
My web server is (include version): Apache/2.4.52 (Ubuntu) buitl: 2023-05-03T20:02:51
The operating system my web server runs on is (include version): ubuntu server 22.04.3 LTS
My hosting provider, if applicable, is: Aix Marseille Université
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
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you're using Certbot): certbot 1.21.0
I suspect a problem with WSGI because I have Flask applications served by apache. However my virtual-host enabled should handle this. I don't understand what's wrong. Perhaps a legal problem? Because the "acme-challenge" folder is not created after the sudo certbot -v --apache command.
Here are my virtual-host.conf and virtual-host-ssl.conf files (for the moment I'm temporarily using ZeroSSL, but I'd like to switch to certbot/let's encrypt)
<VirtualHost *:80>
ServerName sesstim4.timone.univ-amu.fr
# ServerAlias sesstim4.timone.univ-amu.fr
ServerAdmin jean-charles.dufour@univ-amu.fr
DocumentRoot /var/www/html
# pour application agendaradar
# Utilisation de IfDefine pour gérer le bug de certbot cf. ici https://github.com/certbot/certbot/issues/8373
<IfDefine !wsgi_init>
WSGIDaemonProcess agendaradar python-path=/var/www/jcd_flask_apps/agendaradar:/var/www/jcd_flask_apps/agendaradar/venv/lib/python3.10/site-packages
WSGIProcessGroup agendaradar
WSGIScriptAlias /agendaradar /var/www/jcd_flask_apps/agendaradar/agendaradar.wsgi
Define wsgi_init 1
</IfDefine>
<Directory /var/www/jcd_flask_apps/agendaradar>
Require all granted
</Directory>
# pour application agendareconduction
# Utilisation de IfDefine pour gérer le bug de certbot cf. ici https://github.com/certbot/certbot/issues/8373
<IfDefine !wsgi_init_agendareconduction>
WSGIDaemonProcess agendareconduction python-path=/var/www/jcd_flask_apps/agendareconduction:/var/www/jcd_flask_apps/agendareconduction/venv/lib/python3.10/site-packages
WSGIProcessGroup agendareconduction
WSGIScriptAlias /agendareconduction /var/www/jcd_flask_apps/agendareconduction/agendareconduction.wsgi
Define wsgi_init_agendareconduction 1
</IfDefine>
<Directory /var/www/jcd_flask_apps/agendareconduction>
Require all granted
</Directory>
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
#RewriteEngine on
#RewriteCond %{SERVER_NAME} =sesstim4.timone.univ-amu.fr
#RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
ServerName sesstim4.timone.univ-amu.fr
ServerAdmin jean-charles.dufour@univ-amu.fr
DocumentRoot /var/www/html
SSLEngine on
SSLCertificateFile /etc/ssl/certificate.crt
SSLCertificateKeyFile /etc/ssl/private/private.key
SSLCertificateChainFile /etc/ssl/ca_bundle.crt
# pour application agendaradar
# Utilisation de IfDefine pour gérer le bug de certbot cf. ici https://github.com/certbot/certbot/issues/8373
<IfDefine !wsgi_init>
WSGIDaemonProcess agendaradar python-path=/var/www/jcd_flask_apps/agendaradar:/var/www/jcd_flask_apps/agendaradar/venv/lib/python3.10/site-packages
#WSGIProcessGroup agendaradar
<Location /agendaradar>
WSGIProcessGroup agendaradar
</Location>
WSGIScriptAlias /agendaradar /var/www/jcd_flask_apps/agendaradar/agendaradar.wsgi
Define wsgi_init 1
</IfDefine>
<Directory /var/www/jcd_flask_apps/agendaradar>
Require all granted
</Directory>
# pour application agendareconduction
# Utilisation de IfDefine pour gérer le bug de certbot cf. ici https://github.com/certbot/certbot/issues/8373
<IfDefine !wsgi_init_agendareconduction>
WSGIDaemonProcess agendareconduction python-path=/var/www/jcd_flask_apps/agendareconduction:/var/www/jcd_flask_apps/agendareconduction/venv/lib/python3.10/site-packages
#WSGIProcessGroup agendareconduction
<Location /agendareconduction>
WSGIProcessGroup agendareconduction
</Location>
WSGIScriptAlias /agendareconduction /var/www/jcd_flask_apps/agendareconduction/agendareconduction.wsgi
Define wsgi_init_agendareconduction 1
</IfDefine>
<Directory /var/www/jcd_flask_apps/agendareconduction>
Require all granted
</Directory>
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>
</IfModule>
Thank you for your help.